Struct script::dom::element::Element[][src]

#[repr(C)]
pub struct Element {
Show fields node: Node, local_name: LocalName, tag_name: TagName, namespace: Namespace, prefix: DomRefCell<Option<Prefix>>, attrs: DomRefCell<Vec<Dom<Attr>>>, id_attribute: DomRefCell<Option<Atom>>, is: DomRefCell<Option<LocalName>>, style_attribute: DomRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>, attr_list: MutNullableDom<NamedNodeMap>, class_list: MutNullableDom<DOMTokenList>, state: Cell<ElementState>, selector_flags: Cell<ElementSelectorFlags>, rare_data: DomRefCell<Option<Box<ElementRareData>>>,
}

Fields

node: Nodelocal_name: LocalNametag_name: TagNamenamespace: Namespaceprefix: DomRefCell<Option<Prefix>>attrs: DomRefCell<Vec<Dom<Attr>>>id_attribute: DomRefCell<Option<Atom>>is: DomRefCell<Option<LocalName>>style_attribute: DomRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>attr_list: MutNullableDom<NamedNodeMap>class_list: MutNullableDom<DOMTokenList>state: Cell<ElementState>selector_flags: Cell<ElementSelectorFlags>

These flags are set by the style system to indicate the that certain operations may require restyling this element or its descendants. The flags are not atomic, so the style system takes care of only set them when it has exclusive access to the element.

rare_data: DomRefCell<Option<Box<ElementRareData>>>

Implementations

style will be None for elements in a display: none subtree. otherwise, the element has a layout box iff it doesn’t have display: none.

Computed value of overflow-x or overflow-y is “visible”

Computed value of overflow-x or overflow-y is “hidden”

https://dom.spec.whatwg.org/#dom-element-attachshadow XXX This is not exposed to web content yet. It is meant to be used for UA widgets only.

Trait Implementations

Check whether a DOM object implements one of its deriving interfaces.

Cast a DOM object upwards to one of the interfaces it derives from.

Cast a DOM object downwards to one of the interfaces it might implement.

Formats the value using the given formatter. Read more

Returns the receiver’s reflector.

Returns the global scope of the realm that the DomObject was created in.

Function pointer to the general wrap function type

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

Returns whether the given DOM class derives that interface.

Trace self.

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more

Initializes the Reflector

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

This method tests for !=.

Convert self to a JSVal. JSAPI failure causes a panic.

Returns self as the superclass of the implementation for this trait, if any. Read more

Returns true if given attribute attr affects style of the given element. Read more

Returns the right AttrValue variant for the attribute with name name on this element. Read more

Called when a Node is appended to a tree, where ‘tree_connected’ indicates whether the tree is part of a Document. Read more

Called when a Node is removed from a tree, where ‘tree_connected’ indicates whether the tree is part of a Document. Implements removing steps: https://dom.spec.whatwg.org/#concept-node-remove-ext Read more

Called on the parent when its children are changed.

Called during event dispatch after the bubbling phase completes.

Called on an element when it is popped off the stack of open elements of a parser. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Convert

Convert

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.