Class type Ext_dom_AbstractElement.t


class type t = object .. end
Inherits
method defaultUnit : Js.js_string Js.t Js.prop

The default unit to append to CSS values where a unit isn't provided.

Overridden in Ext.dom.AbstractElement_static.

Defaults to: "px"

method dom : Dom_html.element Js.t Js.prop

The DOM element


method id : Js.js_string Js.t Js.prop

The DOM element ID


method addCls : 'a.
'a Js.t ->
(< addCls : 'a. 'b;
appendChild : 'd. 'd Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth;
appendTo : 'e. 'e Js.t -> 'c Js.t Js.meth;
applyStyles : 'f. 'f Js.t -> 'c Js.t Js.meth;
callParent : 'g 'h. 'g Js.t -> 'h Js.t Js.meth;
callSuper : 'i 'j. 'i Js.t -> 'j Js.t Js.meth;
child : 'k. Js.js_string Js.t -> bool Js.t Js.optdef -> 'k Js.t Js.meth;
contains : 'l. 'l Js.t -> bool Js.t Js.meth;
createChild : 'm.
'm Js.t ->
Dom_html.element Js.t Js.optdef ->
bool Js.t Js.optdef -> 'c Js.t Js.meth;
defaultUnit : Js.js_string Js.t Js.prop; destroy : unit Js.meth;
dom : Dom_html.element Js.t Js.prop;
down : 'n. Js.js_string Js.t -> bool Js.t Js.optdef -> 'n Js.t Js.meth;
findParent : 'o.
Js.js_string Js.t ->
'o Js.t Js.optdef ->
bool Js.t Js.optdef -> Dom_html.element Js.t Js.meth;
findParentNode : 'p.
Js.js_string Js.t ->
'p Js.t Js.optdef ->
bool Js.t Js.optdef -> Dom_html.element Js.t Js.meth;
first : 'q.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'q Js.t Js.meth;
getActiveElement : Dom_html.element Js.t Js.meth;
getAttribute : Js.js_string Js.t ->
Js.js_string Js.t Js.optdef -> Js.js_string Js.t Js.meth;
getBorderWidth : Js.js_string Js.t -> Js.number Js.t Js.meth;
getById : Js.js_string Js.t -> bool Js.t Js.optdef -> unit Js.meth;
getHTML : unit Js.meth;
getHeight : bool Js.t Js.optdef -> Js.number Js.t Js.meth;
getInitialConfig : 'r. Js.js_string Js.t Js.optdef -> 'r Js.t Js.meth;
getMargin : 's. Js.js_string Js.t Js.optdef -> 's Js.t Js.meth;
getPadding : Js.js_string Js.t -> Js.number Js.t Js.meth;
getSize : 't. bool Js.t Js.optdef -> 't Js.t Js.meth;
getStyle : 'u 'v. 'u Js.t -> bool Js.t Js.optdef -> 'v Js.t Js.meth;
getValue : 'w. bool Js.t -> 'w Js.t Js.meth;
getViewSize : 'x. 'x Js.t Js.meth;
getWidth : bool Js.t Js.optdef -> Js.number Js.t Js.meth;
hasCls : Js.js_string Js.t -> bool Js.t Js.meth;
hide : 'y. 'y Js.t Js.optdef -> 'c Js.t Js.meth;
id : Js.js_string Js.t Js.prop;
initConfig : 'z. 'z Js.t -> 'c Js.t Js.meth;
insertAfter : 'a1. 'a1 Js.t -> 'c Js.t Js.meth;
insertBefore : 'b1. 'b1 Js.t -> 'c Js.t Js.meth;
insertFirst : 'c1. 'c1 Js.t -> 'c Js.t Js.meth;
insertHtml : 'd1.
Js.js_string Js.t ->
Js.js_string Js.t ->
bool Js.t Js.optdef -> 'd1 Js.t Js.meth;
insertSibling : 'e1.
'e1 Js.t ->
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'c Js.t Js.meth;
is : Js.js_string Js.t -> bool Js.t Js.meth;
isStyle : Js.js_string Js.t -> Js.js_string Js.t -> bool Js.t Js.meth;
isTransparent : Js.js_string Js.t -> bool Js.t Js.meth;
last : 'f1.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'f1 Js.t Js.meth;
mask : Js.js_string Js.t Js.optdef ->
Js.js_string Js.t Js.optdef -> unit Js.meth;
next : 'g1.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'g1 Js.t Js.meth;
parent : 'h1.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'h1 Js.t Js.meth;
prev : 'i1.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef -> 'i1 Js.t Js.meth;
query : Js.js_string Js.t ->
Dom_html.element Js.t Js.js_array Js.t Js.meth;
radioCls : 'j1. 'j1 Js.t -> 'c Js.t Js.meth; remove : unit Js.meth;
removeCls : 'k1. 'k1 Js.t -> 'c Js.t Js.meth; repaint : 'c Js.t Js.meth;
replace : 'l1. 'l1 Js.t -> 'c Js.t Js.meth;
replaceCls : Js.js_string Js.t -> Js.js_string Js.t -> 'c Js.t Js.meth;
replaceWith : 'm1. 'm1 Js.t -> 'c Js.t Js.meth;
select : 'n1.
Js.js_string Js.t -> bool Js.t Js.optdef -> 'n1 Js.t Js.meth;
self : Ext_Class.t Js.t Js.prop;
serializeForm : 'o1. 'o1 Js.t -> Js.js_string Js.t Js.meth;
set : 'p1. 'p1 Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth;
setHTML : Js.js_string Js.t -> 'c Js.t Js.meth;
setHeight : 'q1. 'q1 Js.t -> 'c Js.t Js.meth;
setSize : 'r1 's1. 'r1 Js.t -> 's1 Js.t -> 'c Js.t Js.meth;
setStyle : 't1.
't1 Js.t -> Js.js_string Js.t Js.optdef -> 'c Js.t Js.meth;
setVisibilityMode : 'u1. 'u1 Js.t -> 'c Js.t Js.meth;
setVisible : 'v1. bool Js.t -> 'v1 Js.t Js.optdef -> 'c Js.t Js.meth;
setWidth : 'w1. 'w1 Js.t -> 'c Js.t Js.meth;
show : 'x1. 'x1 Js.t Js.optdef -> 'c Js.t Js.meth;
statics : Ext_Class.t Js.t Js.meth;
toggleCls : Js.js_string Js.t -> 'c Js.t Js.meth; unmask : unit Js.meth;
up : 'y1.
Js.js_string Js.t ->
'y1 Js.t Js.optdef -> bool Js.t Js.optdef -> 'c Js.t Js.meth;
update : Js.js_string Js.t -> 'c Js.t Js.meth;
wrap : 'z1 'a2.
'z1 Js.t Js.optdef ->
bool Js.t Js.optdef ->
Js.js_string Js.t Js.optdef -> 'a2 Js.t Js.meth;
.. >
as 'c)
Js.t Js.meth as 'b

Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method appendChild : 'd. 'd Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth

Appends the passed element(s) to this element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method appendTo : 'e. 'e Js.t -> 'c Js.t Js.meth

Appends this element to the passed element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method applyStyles : 'f. 'f Js.t -> 'c Js.t Js.meth

More flexible version of setStyle for setting style properties.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method child : 'k. Js.js_string Js.t -> bool Js.t Js.optdef -> 'k Js.t Js.meth

Selects a single direct child based on the passed CSS selector (the selector should not contain an id).

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method contains : 'l. 'l Js.t -> bool Js.t Js.meth

Returns true if this element is an ancestor of the passed element

Parameters:

Returns:


method createChild : 'm.
'm Js.t ->
Dom_html.element Js.t Js.optdef -> bool Js.t Js.optdef -> 'c Js.t Js.meth

Creates the passed DomHelper config and appends it to this element or optionally inserts it before the passed child element.

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method destroy : unit Js.meth

Alias to remove.

Removes this element's dom reference. Note that event and cache removal is handled at Ext.removeNode


method down : 'n. Js.js_string Js.t -> bool Js.t Js.optdef -> 'n Js.t Js.meth

Selects a single child at any depth below this element based on the passed CSS selector (the selector should not contain an id).

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method findParent : 'o.
Js.js_string Js.t ->
'o Js.t Js.optdef -> bool Js.t Js.optdef -> Dom_html.element Js.t Js.meth

Looks at this node and then at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method findParentNode : 'p.
Js.js_string Js.t ->
'p Js.t Js.optdef -> bool Js.t Js.optdef -> Dom_html.element Js.t Js.meth

Looks at parent nodes for a match of the passed simple selector (e.g. div.some-class or span:first-child)

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method first : 'q. Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'q Js.t Js.meth

Gets the first child, skipping text nodes

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method getActiveElement : Dom_html.element Js.t Js.meth

Returns the active element in the DOM. If the browser supports activeElement on the document, this is returned. If not, the focus is tracked and the active element is maintained internally.

Defined in override Ext.dom.AbstractElement_static.

Returns:


method getAttribute : Js.js_string Js.t -> Js.js_string Js.t Js.optdef -> Js.js_string Js.t Js.meth

Returns the value of an attribute from the element's underlying DOM node.

Parameters:

Returns:


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

Gets the width of the border(s) for the specified side(s)

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method getById : Js.js_string Js.t -> bool Js.t Js.optdef -> unit Js.meth

Returns a child element of this element given its id.

Parameters:


method getHTML : unit Js.meth

Returns the innerHTML of an Element or an empty string if the element's dom no longer exists.


method getHeight : bool Js.t Js.optdef -> Js.number Js.t Js.meth

Returns the offset height of the element

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method getMargin : 's. Js.js_string Js.t Js.optdef -> 's Js.t Js.meth

Returns an object with properties top, left, right and bottom representing the margins of this element unless sides is passed, then it returns the calculated width of the sides (see getPadding)

Defined in override Ext.dom.AbstractElement_style.

Parameters:


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

Gets the width of the padding(s) for the specified side(s)

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method getSize : 't. bool Js.t Js.optdef -> 't Js.t Js.meth

Returns the size of the element.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method getStyle : 'u 'v. 'u Js.t -> bool Js.t Js.optdef -> 'v Js.t Js.meth

Returns a named style property based on computed/currentStyle (primary) and inline-style if primary is not available.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method getValue : 'w. bool Js.t -> 'w Js.t Js.meth

Returns the value of the "value" attribute

Parameters:


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

Returns the dimensions of the element available to lay content out in.

If the element (or any ancestor element) has CSS style display: none, the dimensions will be zero.

Example:

var vpSize = Ext.getBody().getViewSize();

// all Windows created afterwards will have a default value of 90% height and 95% width
Ext.Window.override({
    width: vpSize.width * 0.9,
    height: vpSize.height * 0.95
});
// To handle window resizing you would have to hook onto onWindowResize.

getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars. To obtain the size including scrollbars, use getStyleSize

Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc.

Defined in override Ext.dom.AbstractElement_style.

Returns:


method getWidth : bool Js.t Js.optdef -> Js.number Js.t Js.meth

Returns the offset width of the element

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method hasCls : Js.js_string Js.t -> bool Js.t Js.meth

Checks if the specified CSS class exists on this element's DOM node.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method hide : 'y. 'y Js.t Js.optdef -> 'c Js.t Js.meth

Hide this element - Uses display mode to determine whether to use "display" or "visibility". See setVisible.

Parameters:

Returns:


method insertAfter : 'a1. 'a1 Js.t -> 'c Js.t Js.meth

Inserts this element after the passed element in the DOM

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method insertBefore : 'b1. 'b1 Js.t -> 'c Js.t Js.meth

Inserts this element before the passed element in the DOM

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method insertFirst : 'c1. 'c1 Js.t -> 'c Js.t Js.meth

Inserts (or creates) an element (or DomHelper config) as the first child of this element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method insertHtml : 'd1.
Js.js_string Js.t ->
Js.js_string Js.t -> bool Js.t Js.optdef -> 'd1 Js.t Js.meth

Inserts an html fragment into this element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method insertSibling : 'e1.
'e1 Js.t ->
Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'c Js.t Js.meth

Inserts (or creates) the passed element (or DomHelper config) as a sibling of this element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method is : Js.js_string Js.t -> bool Js.t Js.meth

Returns true if this element matches the passed simple selector (e.g. div.some-class or span:first-child)

Parameters:

Returns:


method isStyle : Js.js_string Js.t -> Js.js_string Js.t -> bool Js.t Js.meth

Checks if the current value of a style is equal to a given value.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method isTransparent : Js.js_string Js.t -> bool Js.t Js.meth

Returns true if the value of the given property is visually transparent. This may be due to a 'transparent' style value or an rgba value with 0 in the alpha component.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method last : 'f1. Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'f1 Js.t Js.meth

Gets the last child, skipping text nodes

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method mask : Js.js_string Js.t Js.optdef -> Js.js_string Js.t Js.optdef -> unit Js.meth

Puts a mask over this element to disable user interaction. Requires core.css. This method can only be applied to elements which accept child nodes.

Defined in override Ext.dom.AbstractElement_style.

Parameters:


method next : 'g1. Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'g1 Js.t Js.meth

Gets the next sibling, skipping text nodes

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method parent : 'h1. Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'h1 Js.t Js.meth

Gets the parent node for this element, optionally chaining up trying to match a selector

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method prev : 'i1. Js.js_string Js.t Js.optdef -> bool Js.t Js.optdef -> 'i1 Js.t Js.meth

Gets the previous sibling, skipping text nodes

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method query : Js.js_string Js.t -> Dom_html.element Js.t Js.js_array Js.t Js.meth

Selects child nodes based on the passed CSS selector (the selector should not contain an id).

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method radioCls : 'j1. 'j1 Js.t -> 'c Js.t Js.meth

Adds one or more CSS classes to this element and removes the same class(es) from all siblings.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method remove : unit Js.meth

Removes this element's dom reference. Note that event and cache removal is handled at Ext.removeNode


method removeCls : 'k1. 'k1 Js.t -> 'c Js.t Js.meth

Removes one or more CSS classes from the element.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method repaint : 'c Js.t Js.meth

Forces the browser to repaint this element

Defined in override Ext.dom.AbstractElement_style.

Returns:


method replace : 'l1. 'l1 Js.t -> 'c Js.t Js.meth

Replaces the passed element with this element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method replaceCls : Js.js_string Js.t -> Js.js_string Js.t -> 'c Js.t Js.meth

Replaces a CSS class on the element with another. If the old name does not exist, the new name will simply be added.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method replaceWith : 'm1. 'm1 Js.t -> 'c Js.t Js.meth

Replaces this element with the passed element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns:


method select : 'n1. Js.js_string Js.t -> bool Js.t Js.optdef -> 'n1 Js.t Js.meth

Creates a Ext.CompositeElement for child nodes based on the passed CSS selector (the selector should not contain an id).

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method serializeForm : 'o1. 'o1 Js.t -> Js.js_string Js.t Js.meth

Serializes a DOM form into a url encoded string

Defined in override Ext.dom.AbstractElement_static.

Parameters:

Returns:


method set : 'p1. 'p1 Js.t -> bool Js.t Js.optdef -> 'c Js.t Js.meth

Sets the passed attributes as attributes of this element (a style attribute can be a string, object or function)

Parameters:

Returns:


method setHTML : Js.js_string Js.t -> 'c Js.t Js.meth

Set the innerHTML of this element

Parameters:

Returns:


method setHeight : 'q1. 'q1 Js.t -> 'c Js.t Js.meth

Set the height of this Element.

// change the height to 200px and animate with default configuration
Ext.fly('elementId').setHeight(200, true);

// change the height to 150px and animate with a custom configuration
Ext.fly('elId').setHeight(150, {
    duration : 500, // animation will have a duration of .5 seconds
    // will change the content to "finished"
    callback: function(){ this.update("finished"); }
});

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method setSize : 'r1 's1. 'r1 Js.t -> 's1 Js.t -> 'c Js.t Js.meth

Set the size of this Element. If animation is true, both width and height will be animated concurrently.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method setStyle : 't1. 't1 Js.t -> Js.js_string Js.t Js.optdef -> 'c Js.t Js.meth

Wrapper for setting style properties, also takes single object parameter of multiple styles.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method setVisibilityMode : 'u1. 'u1 Js.t -> 'c Js.t Js.meth

Use this to change the visibility mode between VISIBILITY, DISPLAY, OFFSETS or ASCLASS.

Parameters:

Returns:


method setVisible : 'v1. bool Js.t -> 'v1 Js.t Js.optdef -> 'c Js.t Js.meth

Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.

Parameters:

Returns:


method setWidth : 'w1. 'w1 Js.t -> 'c Js.t Js.meth

Set the width of this Element.

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method show : 'x1. 'x1 Js.t Js.optdef -> 'c Js.t Js.meth

Show this element - Uses display mode to determine whether to use "display" or "visibility". See setVisible.

Parameters:

Returns:


method toggleCls : Js.js_string Js.t -> 'c Js.t Js.meth

Toggles the specified CSS class on this element (removes it if it already exists, otherwise adds it).

Defined in override Ext.dom.AbstractElement_style.

Parameters:

Returns:


method unmask : unit Js.meth

Removes a previously applied mask.

Defined in override Ext.dom.AbstractElement_style.


method up : 'y1.
Js.js_string Js.t ->
'y1 Js.t Js.optdef -> bool Js.t Js.optdef -> 'c Js.t Js.meth

Walks up the DOM looking for a parent node that matches the passed simple selector (e.g. div.some-class or span:first-child). This is a shortcut for findParentNode() that always returns an Ext.dom.Element.

Defined in override Ext.dom.AbstractElement_traversal.

Parameters:

Returns:


method update : Js.js_string Js.t -> 'c Js.t Js.meth

Update the innerHTML of this element

Parameters:

Returns:


method wrap : 'z1 'a2.
'z1 Js.t Js.optdef ->
bool Js.t Js.optdef -> Js.js_string Js.t Js.optdef -> 'a2 Js.t Js.meth

Creates and wraps this element with another element

Defined in override Ext.dom.AbstractElement_insertion.

Parameters:

Returns: