A.HTML5 Class
alloy-ui/src/aui-node/js/aui-node-html5.js:10
Parent Module: aui-node
An object that encapsulates util methods for HTML5 shiving.
What is a "shiv"?
To the world, a shiv is a slang term for a sharp object used as a knife-like weapon. To Internet Explorer, a shiv is a script that, when executed, forces the browser to recognize HTML5 elements.
Index
Methods
Properties
Methods
_doBeforeCreate
-
html
-
doc
-
tag
AOP listener to the A.DOM._create method. This method intercepts all the calls to the A.DOM._create and append the generated fragment to [A.HTML._fragHTML5Shived](A.HTML5.html#property__frag HTML5Shived), this fixes the IE bug for painting the HTML5 nodes on the HTML fragment.
Parameters:
-
html
StringHTML content
-
doc
String -
tag
String
Returns:
_getAllCSSText
()
Array
protected
Gets all CSS text from all stylesheets.
Returns:
_getAllStyleSheets
-
styleSheet,
Gets all stylesheets from a page.
Parameters:
-
styleSheet,
ObjectmediaType, level, buffer
Returns:
_getBodyClone
()
Element
protected
Gets a clone of the <body>
element.
Returns:
_getBodyEl
()
Element
protected
Gets the <body>
element.
Returns:
_getCSSTextFromRule
-
rule
Extracts the CSS text from a rule.
Parameters:
-
rule
Object
Returns:
_getDocFrag
()
DocumentFragment
protected
Gets a document fragment object.
Returns:
IECreateFix
-
frag
-
content
Receives a frag
and a HTML content. This method shivs the HTML5
nodes appended to a Node or fragment which is not on the document
yet.
Parameters:
-
frag
Node | DocumentFragmentFragment to be fixed.
-
content
StringHTML to be set (using innerHTML) on the
frag
.
Returns:
onAfterPrint
()
Fires after a print.
onBeforePrint
()
Fires before a print.
parseCSS
-
cssText
Navigates through the CSS joining rules and replacing content.
Parameters:
-
cssText
Object
Returns:
restoreHTML
()
Restores the HTML from the bodyClone
and bodyEl
attributes.
writeHTML
()
Generates the HTML for print.
Properties
_fragHTML5Shived
DocumentFragment
protected
A global DocumentFragment already HTML5 shived, for performance reasons. (i.e., all nodes and its HTML5 children appended to this fragment iherits the styles on IE).