Interface IDomHelper

Index

Methods

Methods

optional public append(el?: any, o?: any, returnElement?: boolean): any

[Method] Creates new DOM element s and appends them to el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element

  • o?: any optional

    Object/String The DOM object spec (and children) or raw HTML blob

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element

Returns

any

HTMLElement/Ext.Element The new node

optional public applyStyles(el?: any, styles?: any)

[Method] Applies a style specification to an element

Parameters

  • el?: any optional

    String/HTMLElement The element to apply styles to

  • styles?: any optional

    String/Object/Function A style specification string e.g. 'width:100px', or object in the form {width:'100px'}, or a function which returns such a specification.

optional public createTemplate(o?: any): ITemplate

[Method] Creates a new Ext Template from the DOM object spec

Parameters

  • o?: any optional

    Object The DOM object spec (and children)

Returns

ITemplate

Ext.Template The new template

optional public generateStyles(styles?: any, buffer?: Array<string>): any

[Method] Converts the styles from the given object to text

Parameters

  • styles?: any optional

    Object The object describing the styles.

  • buffer?: Array<string> optional

    String[] The output buffer.

Returns

any

String/String[] If buffer is passed, it is returned. Otherwise the style string is returned.

optional public insertAfter(el?: any, o?: any, returnElement?: boolean): any

[Method] Creates new DOM element s and inserts them after el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element

  • o?: any optional

    Object The DOM object spec (and children)

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element

Returns

any

HTMLElement/Ext.Element The new node

optional public insertBefore(el?: any, o?: any, returnElement?: boolean): any

[Method] Creates new DOM element s and inserts them before el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element

  • o?: any optional

    Object/String The DOM object spec (and children) or raw HTML blob

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element

Returns

any

HTMLElement/Ext.Element The new node

optional public insertFirst(el?: any, o?: any, returnElement?: boolean): any

[Method] Creates new DOM element s and inserts them as the first child of el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element

  • o?: any optional

    Object/String The DOM object spec (and children) or raw HTML blob

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element

Returns

any

HTMLElement/Ext.Element The new node

optional public insertHtml(where?: string, el?: any, html?: string): HTMLElement

[Method] Inserts an HTML fragment into the DOM

Parameters

  • where?: string optional

    String Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. For example take the following HTML: <div>Contents</div> Using different where values inserts element to the following places: beforeBegin: <HERE><div>Contents</div> afterBegin: <div><HERE>Contents</div> beforeEnd: <div>Contents<HERE></div> afterEnd: <div>Contents</div><HERE>

  • el?: any optional

    HTMLElement/TextNode The context element

  • html?: string optional

    String The HTML fragment

Returns

HTMLElement

HTMLElement The new node

optional public markup(spec?: any): string

[Method] Returns the markup for the passed Element s config

Parameters

  • spec?: any optional

    Object The DOM object spec (and children).

Returns

string

String

optional public overwrite(el?: any, o?: any, returnElement?: boolean): any

[Method] Creates new DOM element s and overwrites the contents of el with them

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element

  • o?: any optional

    Object/String The DOM object spec (and children) or raw HTML blob

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element

Returns

any

HTMLElement/Ext.Element The new node