Struct sciter::dom::Element [] [src]

pub struct Element { /* fields omitted */ }

DOM element wrapper. See the module-level documentation also.

Methods

impl Element
[src]

Construct Element object from HELEMENT handle.

Create new element, it is disconnected initially from the DOM.

Create new element as child of parent.

Create new element with specified text, it is disconnected initially from the DOM.

Create new element with specified type, which is useful for controls and widgets (initially disconnected).

Get root DOM element of the Sciter document.

Get focus DOM element of the Sciter document.

Get highlighted element.

Find DOM element of the Sciter document by coordinates.

Get element handle by its UID.

Access element pointer.

Get element UID - identifier suitable for storage.

Return element tag as string (e.g. 'div', 'body').

Get inner text of the element as string.

Set inner text of the element.

Get html representation of the element as utf-8 bytes.

Set inner or outer html of the element.

Get value of the element.

Set value of the element.

Get HWINDOW of containing window.

Sends sinking/bubbling event to the child/parent chain of element.

Post asynchronously a sinking/bubbling event to the child/parent chain of element.

Send or posts event to the child/parent chain of element.

Send or posts event with specified params to the child/parent chain of element.

Evaluate script in element context.

Call scripting function defined in the namespace of the element (a.k.a. global function).

You can use the make_args!(a,b,c) macro which help you construct script arguments from Rust types.

Call scripting method defined for the element.

You can use the make_args!(a,b,c) macro which help you construct script arguments from Rust types.

Get number of the attributes.

Get attribute name by its index.

Get attribute value by its index.

Get attribute value by its name.

Add or replace attribute.

Remove attribute.

Toggle attribute.

Remove all attributes from the element.

Get style attribute of the element by its name.

Get index of this element in its parent collection.

Get root of the element.

Get parent element.

Get first sibling element.

Get last sibling element.

Get next sibling element.

Get previous sibling element.

Get first child element.

Get last child element.

Get element child at specified index.

Get element child at specified index.

Get number of child elements.

Get number of child elements.

Clear content of the element.

Create new element as copy of existing element.

The new element is a full (deep) copy of the element and is initially disconnected from the DOM. Note that Element.clone() does not clone DOM element, just increments its reference count.

Insert element at index position of this element.

Note that we cannot follow Rust semantic here because the newly created Element is unusable before it will be inserted at DOM.

Append element as last child of this element.

Append element as last child of this element.

Remove the last child from this element and returns it, or None if this element is empty.

Take element out of its container (and DOM tree).

Take element out of its container (and DOM tree) and force destruction of all behaviors.

Swap element positions.

Test this element against CSS selector(s).

Will find first parent element starting from this satisfying given css selector(s).

Will find first element starting from this satisfying given css selector(s).

Will find all elements starting from this satisfying given css selector(s).

Apply changes and refresh element area in its window.

Start Timer for the element. Element will receive on_timer event.

Note that timer events are not bubbling, so you need attach handler to the target element directly.

Stop Timer for the element.

Attach the native event handler to this element.

Detach your handler from the element. Handlers identified by token from attach_handler() result.

Trait Implementations

impl PartialEq for Element
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Drop for Element
[src]

Release element pointer.

A method called when the value goes out of scope. Read more

impl Clone for Element
[src]

Increment reference count of the dom element.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Element
[src]

Human element representation.

Formats the value using the given formatter.

impl Debug for Element
[src]

Machine-like element visualization.

Formats the value using the given formatter.