States object

Represents states of DOM elements.

To access state collection of the element use its state property: element.state

Properties
link rw true/false, true if this element is a link - has href attribute defined.
hover rw true/false,
active rw true/false,
focus rw true/false, this element is in focus. To set focus on the element is it enough to assign true value to the attribute:
el.state.focus = true;
tabfocus r true/false, this element is in focus and got the focus due to TAB/SHIFT+TAB key handling.
visited rw true/false,
current rw true/false,
checked rw true/false,
disabled rw true/false,
readonly rw true/false,
expanded rw true/false,
collapsed rw true/false,
incomplete rw true/false,
animating r true/false, element is running animation.
focusable r true/false, element is focusable. Focusable is the element having either: tabindex >= 0 attribute defined or it has behavior that has focus handler defined.
anchor rw true/false, element is an anchor (first element) in selection.
synthetic rw true/false, element was synthesized - created by some behavior.
popup rw true/false, element is shown as popup window. To close such popup window simply assign value false to the attribute:
el.state.popup = false;
ownspopup r true/false, element is requested popup to be shown and that popup is visible. Following:
el.popup(elementToPopup, pos);
will cause this flag to be set for the element el.
empty r true/false, the element is empty - has no children and no text.
busy rw true/false, element is requested data to be delivered by calling el.request(...) and that data is not delivered yet.
dragover r true/false, the dragged element is over the element.
droptarget r true/false, dragging is active and the element is active drop target for the dragging element.
moving
copying
r true/false, either one of these is true for the element that is being dragged. Engine creates copy of drag-source element and that copy is being dragged.
dragsource r true/false, element one of these is true for the element that being dragged.
pressed rw true/false, element has mouse pressed in it.
isltr
isrtl
r true/false, element is in directional environment - itself or one of its parents has attribute dir defined.
Methods
get
() returns: int

Returns integer - "ORed" set of Element.STATE_*** constants.

set
(flags:int) returns: undefined

Sets flags. flags here "ORed" set of Element.STATE_*** constants.

clear
(flags:int) returns: undefined

Clears flags.