Class Element

Index

Methods

Methods

public static addMembers(members?: any)

[Method] Add methods properties to the prototype of this class

Parameters

  • members?: any optional

    Object

public static addStatics(members?: any): IBase

[Method] Add override static properties of this class

Parameters

  • members?: any optional

    Object

Returns

IBase

Ext.Base this

public static callParent(args?: any)

[Method]

Parameters

  • args?: any optional

    Object

public static createAlias(alias?: any, origin?: any)

[Method] Create aliases for existing prototype methods

Parameters

  • alias?: any optional

    String/Object The new method name, or an object to set multiple aliases. See flexSetter

  • origin?: any optional

    String/Object The original method name

public static fly(element?: any, named?: string): IElement

[Method] Gets the globally shared flyweight Element with the passed node as the active element

Parameters

  • element?: any optional

    String/HTMLElement The DOM node or id.

  • named?: string optional

    String Allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_global").

Returns

IElement

Ext.dom.Element The shared Element object (or null if no matching element was found).

public static fromPoint(x?: number, y?: number): string

[Method] Returns the top Element that is located at the passed coordinates

Parameters

  • x?: number optional

    Number The x coordinate

  • y?: number optional

    Number The y coordinate

Returns

string

String The found Element

public static get(element?: any): IElement

[Method] Retrieves Ext dom Element objects

Parameters

  • element?: any optional

    String/HTMLElement/Ext.Element The id of the node, a DOM Node or an existing Element.

Returns

IElement

Ext.dom.Element The Element object (or null if no matching element was found).

public static getDocumentHeight(): number

[Method] Retrieves the document height

Returns

number

Number documentHeight

public static getDocumentWidth(): number

[Method] Retrieves the document width

Returns

number

Number documentWidth

public static getName(): string

[Method] Get the current class name in string format

Returns

string

String className

public static getOrientation(): string

[Method] Retrieves the current orientation of the window

Returns

string

String Orientation of window: 'portrait' or 'landscape'

public static getViewSize(): any

[Method] Retrieves the viewport size of the window

Returns

any

Object object containing width and height properties

public static getViewportHeight(): number

[Method] Retrieves the viewport height of the window

Returns

number

Number viewportHeight

public static getViewportWidth(): number

[Method] Retrieves the viewport width of the window

Returns

number

Number viewportWidth

public static normalize(prop?: string): string

[Method] Normalizes CSS property keys from dash delimited to camel case JavaScript Syntax

Parameters

  • prop?: string optional

    String The property to normalize

Returns

string

String The normalized string

public static override(members?: any): IBase

[Method] Override members of this class

Parameters

  • members?: any optional

    Object The properties to add to this class. This should be specified as an object literal containing one or more properties.

Returns

IBase

Ext.Base this class

public static parseBox(box?: any): any

[Method] Parses a number or string representing margin sizes into an object

Parameters

  • box?: any optional

    Number/String The encoded margins

Returns

any

Object An object with margin sizes for top, right, bottom and left containing the unit

public static parseStyles(styles?: string): any

[Method] Converts a CSS string into an object with a property for each style

Parameters

  • styles?: string optional

    String A CSS string

Returns

any

Object styles

public static select(selector?: any, composite?: boolean, root?: any): ICompositeElementLite

[Method] Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in

Parameters

  • selector?: any optional

    String/HTMLElement[] The CSS selector or an array of elements

  • composite?: boolean optional

    Boolean Return a CompositeElement as opposed to a CompositeElementLite. Defaults to false.

  • root?: any optional

    HTMLElement/String The root element of the query or id of the root

Returns

ICompositeElementLite

Ext.dom.CompositeElementLite/Ext.dom.CompositeElement

public static serializeForm(form?: any): string

[Method] Serializes a DOM form into a url encoded string

Parameters

  • form?: any optional

    Object The form

Returns

string

String The url encoded form

public static serializeNode(node?: any): string

[Method] Serializes a DOM element and its children recursively into a string

Parameters

  • node?: any optional

    Object DOM element to serialize.

Returns

string

String

public static unitizeBox(box?: any, units?: string): string

[Method] Parses a number or string representing margin sizes into an object

Parameters

  • box?: any optional

    Number/String The encoded margins

  • units?: string optional

    String The type of units to add

Returns

string

String An string with unitized (px if units is not specified) metrics for top, right, bottom and left