Class type Ext_dom_AbstractElement.statics


class type statics = object .. end
Inherits
method _ASCLASS : Js.number Js.t Js.prop

Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Add or remove the Ext.Layer.visibilityCls class to hide the element.

Defaults to: 4

method _DISPLAY : Js.number Js.t Js.prop

Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use the CSS 'display' property to hide the element.

Defaults to: 2

method _OFFSETS : Js.number Js.t Js.prop

Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use CSS absolute positioning and top/left offsets to hide the element.

Defaults to: 3

method _VISIBILITY : Js.number Js.t Js.prop

Visibility mode constant for use with Ext.dom.Element.setVisibilityMode. Use the CSS 'visibility' property to hide the element.

Note that in this mode, isVisible may return true for an element even though it actually has a parent element that is hidden. For this reason, and in most cases, using the OFFSETS mode is a better choice.

Defaults to: 1

method fly : 'a 'b. 'a Js.t -> Js.js_string Js.t Js.optdef -> 'b Js.t Js.meth

Gets the singleton flyweight element, with the passed node as the active element.

Because it is a singleton, this Flyweight does not have an ID, and must be used and discarded in a single line. You may not keep and use the reference to this singleton over multiple lines because methods that you call may themselves make use of Ext.fly and may change the DOM element to which the instance refers.

Ext.fly is alias for fly.

Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext's classes. If accessing an element which will be processed regularly, then Ext.get will be more appropriate to take advantage of the caching provided by the Ext.dom.Element class.

Parameters:

Returns:


method fromPoint : Js.number Js.t -> Js.number Js.t -> Js.js_string Js.t Js.meth

Returns the top Element that is located at the passed coordinates

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns:


method get : 'c 'd. 'c Js.t -> 'd Js.t Js.meth

Retrieves Ext.dom.Element objects. Ext.get is alias for Ext.dom.Element.get.

This method does not retrieve Components. This method retrieves Ext.dom.Element objects which encapsulate DOM elements. To retrieve a Component by its ID, use Ext.ComponentManager.get.

When passing an id, it should not include the # character that is used for a css selector.

// For an element with id 'foo'
Ext.get('foo'); // Correct
Ext.get('#foo'); // Incorrect

Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

Parameters:

Returns:


method getDocumentHeight : Js.number Js.t Js.meth

Retrieves the document height

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getDocumentWidth : Js.number Js.t Js.meth

Retrieves the document width

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getOrientation : Js.js_string Js.t Js.meth

Retrieves the current orientation of the window. This is calculated by determing if the height is greater than the width.

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getViewSize : 'e. 'e Js.t Js.meth

Retrieves the viewport size of the window.

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getViewportHeight : Js.number Js.t Js.meth

Retrieves the viewport height of the window.

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getViewportWidth : Js.number Js.t Js.meth

Retrieves the viewport width of the window.

Defined in override Ext.dom.AbstractElement_static.

Returns:


method mergeClsList : 'f 'g 'h. 'f Js.t -> 'g Js.t -> 'h Js.js_array Js.t Js.meth

Returns an array of unique class names based upon the input strings, or string arrays.

The number of parameters is unlimited.

Example

// Add x-invalid and x-mandatory classes, do not duplicate
myElement.dom.className = Ext.core.Element.mergeClsList(this.initialClasses, 'x-invalid x-mandatory');

Parameters:

Returns:


method normalize : Js.js_string Js.t -> Js.js_string Js.t Js.meth

Normalizes CSS property keys from dash delimited to camel case JavaScript Syntax. For example:

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns:


method parseBox : 'i 'j. 'i Js.t -> 'j Js.t Js.meth

Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns:


method parseStyles : 'k. Js.js_string Js.t -> 'k Js.t Js.meth

Converts a CSS string into an object with a property for each style.

The sample code below would return an object with 2 properties, one for background-color and one for color.

var css = 'background-color: red;color: blue; ';
console.log(Ext.dom.Element.parseStyles(css));

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns:


method removeCls : 'l 'm 'n. 'l Js.t -> 'm Js.t -> 'n Js.js_array Js.t Js.meth

Returns an array of unique class names deom the first parameter with all class names from the second parameter removed.

Example

// Remove x-invalid and x-mandatory classes if present.
myElement.dom.className = Ext.core.Element.removeCls(this.initialClasses, 'x-invalid x-mandatory');

Parameters:

Returns:


method unitizeBox : 'o. 'o Js.t -> Js.js_string Js.t -> Js.js_string Js.t Js.meth

Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result)

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns: