The DomHelper class provides a layer of abstraction from DOM and transparently supports creating
+
The DomHelper class provides a layer of abstraction from DOM and transparently supports creating
elements via DOM or using HTML fragments. It also has the ability to create HTML fragment templates
from your DOM building code.
DomHelper element specification object
@@ -100,14 +100,22 @@ of DOM can significantly boost performance.
Element creation specification parameters may also be strings. If useDom is false,
then the string is used as innerHTML. If useDom is true, a string specification
results in the creation of a text node. Usage:
-
Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
This class is a singleton and cannot be created directly.Public Properties
|
| useDom : Boolean True to force the use of DOM instead of html fragments | DomHelper |
Public Methods
|
| applyStyles( String/HTMLElement el , String/Object/Function styles )
+Ext.DomHelper.useDom = true; // force it to use DOM; reduces performance
This class is a singleton and cannot be created directly.Public Properties|
| useDom : Boolean True to force the use of DOM instead of html fragments | DomHelper |
Public Methods|
| append( Mixed el , Object/String o , [Boolean returnElement ] )
+ :
+ HTMLElement/Ext.ElementCreates new DOM element(s) and appends them to el. Creates new DOM element(s) and appends them to el. Parameters:Returns:HTMLElement/Ext.Element The new node
| DomHelper | | applyStyles( String/HTMLElement el , String/Object/Function styles )
:
voidApplies a style specification to an element. Applies a style specification to an element. Parameters:el : String/HTMLElementThe element to apply styles to styles : String/Object/FunctionA style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or
a function which returns such a specification. Returns: | DomHelper | | createDom( Object/String o )
:
HTMLElementCreates new DOM element(s) without inserting them to the document. Creates new DOM element(s) without inserting them to the document. Parameters:Returns:HTMLElement The new uninserted node
| DomHelper | | createTemplate( Object o )
:
- Ext.TemplateCreates a new Ext.Template from the DOM object spec. Creates a new Ext.Template from the DOM object spec. Parameters:Returns:Ext.Template The new template
| DomHelper | | insertHtml( String where , HTMLElement el , String html )
+ Ext.TemplateCreates a new Ext.Template from the DOM object spec. Creates a new Ext.Template from the DOM object spec. Parameters:Returns:Ext.Template The new template
| DomHelper | | insertAfter( Mixed el , Object o , [Boolean returnElement ] )
+ :
+ HTMLElement/Ext.ElementCreates new DOM element(s) and inserts them after el. Creates new DOM element(s) and inserts them after el. Parameters:Returns:HTMLElement/Ext.Element The new node
| DomHelper | | insertBefore( Mixed el , Object/String o , [Boolean returnElement ] )
+ :
+ HTMLElement/Ext.ElementCreates new DOM element(s) and inserts them before el. Creates new DOM element(s) and inserts them before el. Parameters:Returns:HTMLElement/Ext.Element The new node
| DomHelper | | insertFirst( Mixed el , Object/String o , [Boolean returnElement ] )
+ :
+ HTMLElement/Ext.ElementCreates new DOM element(s) and inserts them as the first child of el. Creates new DOM element(s) and inserts them as the first child of el. Parameters:Returns:HTMLElement/Ext.Element The new node
| DomHelper | | insertHtml( String where , HTMLElement el , String html )
:
HTMLElementInserts an HTML fragment into the DOM. Inserts an HTML fragment into the DOM. | DomHelper | | markup( Object o )
:
|
|