Alloy UI

aui-node  1.0.1

 
Filters

Class A.HTML5

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.

Properties

A.HTML._fragHTML5Shived - protected DocumentFragment (shived)

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).

Methods

_doBeforeCreate

protected DocumentFragment _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, this fixes the IE bug for painting the HTML5 nodes on the HTML fragment.
Parameters:
html <String> HTML content
doc <String>
tag <String>

IECreateFix

Node | DocumentFragment 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 | DocumentFragment> Fragment to be fixed.
content <String> HTML to be set (using innerHTML) on the frag.