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 it is 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
rw - 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, either one of these is true for the element that is 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.
value
rw - "raw" value of the element. It is either the value managed by native behavior or, if the element has no behavior attached, it is a text of the element (see Element.text).
screen
r - integer, number of screen (monitor) on which this element is rendered at the moment. Note it can be different from view.screen for popup elements.
awaitsDraw
rw - boolean, flag indicating that the element is awaiting to be drawn after Element.refresh() was issued for it. Sciter sets this flag autmatically. It also resets it when the element gets drawn on the screen. In between you can set/reset it from code.
flowType
r - symbol, reports flow type used by the element, is one of:  

#vertical, #horizontal, #horizontal-flow, #vertical-flow, #grid, #table, #table-fixed, #stack, #text, #table-row, #table-body, #columns, #null, #image, #svg, #svg-child or undefined (if element is inline or display-none).

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.