Properties Methods Events Direct Link

Class Ext.DomHelper

Package:Ext
Defined In:DomHelper.js
Class:DomHelper
Extends:Object
Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.
This is an example, where an unordered list with 5 children items is appended to an existing element with id 'my-div':
var list = dh.append('my-div', {
    tag: 'ul', cls: 'my-list', children: [
        {tag: 'li', id: 'item0', html: 'List Item 0'}, 
        {tag: 'li', id: 'item1', html: 'List Item 1'}, 
        {tag: 'li', id: 'item2', html: 'List Item 2'}, 
        {tag: 'li', id: 'item3', html: 'List Item 3'}, 
        {tag: 'li', id: 'item4', html: 'List Item 4'}
    ]
});
For more information and examples, see the original blog post.

This class is a singleton and cannot be created directly.

Public Properties

Property Defined By
  useDom : Boolean
True to force the use of DOM instead of html fragments
DomHelper

Public Methods

Method Defined By

Public Events

This class has no public events.