Struct script::dom::element::Element

source ·
#[repr(C)]
pub struct Element {
Show 14 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: 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>

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§

source§

impl Element

source§

impl Element

source

pub fn create( name: QualName, is: Option<LocalName>, document: &Document, creator: ElementCreator, mode: CustomElementCreationMode, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Root<Dom<Element>>

source

pub fn new_inherited( local_name: LocalName, namespace: Namespace, prefix: Option<Prefix>, document: &Document, ) -> Element

source

pub fn new_inherited_with_state( state: ElementState, local_name: LocalName, namespace: Namespace, prefix: Option<Prefix>, document: &Document, ) -> Element

source

pub fn new( local_name: LocalName, namespace: Namespace, prefix: Option<Prefix>, document: &Document, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Root<Dom<Element>>

source

fn rare_data(&self) -> Ref<'_, Option<Box<ElementRareData>>>

source

fn rare_data_mut(&self) -> RefMut<'_, Option<Box<ElementRareData>>>

source

fn ensure_rare_data(&self) -> RefMut<'_, Box<ElementRareData>>

source

pub fn restyle(&self, damage: NodeDamage)

source

pub fn set_is(&self, is: LocalName)

source

pub fn get_is(&self) -> Option<LocalName>

source

pub fn set_custom_element_state(&self, state: CustomElementState)

source

pub fn get_custom_element_state(&self) -> CustomElementState

source

pub fn set_custom_element_definition( &self, definition: Rc<CustomElementDefinition>, )

source

pub fn get_custom_element_definition( &self, ) -> Option<Rc<CustomElementDefinition>>

source

pub fn clear_custom_element_definition(&self)

source

pub fn push_callback_reaction( &self, function: Rc<Function>, args: Box<[Heap<JSVal>]>, )

source

pub fn push_upgrade_reaction(&self, definition: Rc<CustomElementDefinition>)

source

pub fn clear_reaction_queue(&self)

source

pub fn invoke_reactions(&self, can_gc: CanGc)

source

pub fn style(&self, can_gc: CanGc) -> Option<Arc<ComputedValues>>

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.

source

pub fn has_css_layout_box(&self, can_gc: CanGc) -> bool

source

fn is_potentially_scrollable_body(&self, can_gc: CanGc) -> bool

source

fn has_scrolling_box(&self, can_gc: CanGc) -> bool

source

fn has_overflow(&self, can_gc: CanGc) -> bool

source

pub(crate) fn shadow_root(&self) -> Option<Root<Dom<ShadowRoot>>>

source

pub fn is_shadow_host(&self) -> bool

source

pub fn attach_shadow( &self, is_ua_widget: IsUserAgentWidget, mode: ShadowRootMode, clonable: bool, ) -> Result<Root<Dom<ShadowRoot>>, Error>

source

pub fn detach_shadow(&self)

source

pub fn is_translate_enabled(&self) -> bool

source

pub fn directionality(&self) -> String

source

pub(crate) fn is_root(&self) -> bool

source§

impl Element

source

pub fn is_html_element(&self) -> bool

source

pub fn html_element_in_html_document(&self) -> bool

source

pub fn local_name(&self) -> &LocalName

source

pub fn parsed_name(&self, name: DOMString) -> LocalName

source

pub fn namespace(&self) -> &Namespace

source

pub fn prefix(&self) -> Ref<'_, Option<Prefix>>

source

pub fn set_prefix(&self, prefix: Option<Prefix>)

source

pub fn attrs(&self) -> Ref<'_, [Dom<Attr>]>

source

pub fn locate_namespace(&self, prefix: Option<DOMString>) -> Namespace

source

pub fn name_attribute(&self) -> Option<Atom>

source

pub fn style_attribute( &self, ) -> &DomRefCell<Option<Arc<Locked<PropertyDeclarationBlock>>>>

source

pub fn summarize(&self) -> Vec<AttrInfo>

source

pub fn is_void(&self) -> bool

source

pub fn root_element(&self) -> Root<Dom<Element>>

source

pub fn lookup_prefix(&self, namespace: Namespace) -> Option<DOMString>

source

pub fn input_method_type(&self) -> Option<InputMethodType>

source

pub fn is_focusable_area(&self) -> bool

source

pub fn is_actually_disabled(&self) -> bool

source

pub fn push_new_attribute( &self, local_name: LocalName, value: AttrValue, name: LocalName, namespace: Namespace, prefix: Option<Prefix>, can_gc: CanGc, )

source

pub fn push_attribute(&self, attr: &Attr)

source

pub fn get_attribute( &self, namespace: &Namespace, local_name: &LocalName, ) -> Option<Root<Dom<Attr>>>

source

pub fn get_attribute_by_name(&self, name: DOMString) -> Option<Root<Dom<Attr>>>

source

pub fn set_attribute_from_parser( &self, qname: QualName, value: DOMString, prefix: Option<Prefix>, can_gc: CanGc, )

source

pub fn set_attribute(&self, name: &LocalName, value: AttrValue, can_gc: CanGc)

source

pub fn set_custom_attribute( &self, name: DOMString, value: DOMString, can_gc: CanGc, ) -> Result<(), Error>

source

fn set_first_matching_attribute<F>( &self, local_name: LocalName, value: AttrValue, name: LocalName, namespace: Namespace, prefix: Option<Prefix>, find: F, can_gc: CanGc, )
where F: Fn(&Attr) -> bool,

source

pub fn parse_attribute( &self, namespace: &Namespace, local_name: &LocalName, value: DOMString, ) -> AttrValue

source

pub fn remove_attribute( &self, namespace: &Namespace, local_name: &LocalName, ) -> Option<Root<Dom<Attr>>>

source

pub fn remove_attribute_by_name( &self, name: &LocalName, ) -> Option<Root<Dom<Attr>>>

source

fn remove_first_matching_attribute<F>(&self, find: F) -> Option<Root<Dom<Attr>>>
where F: Fn(&Attr) -> bool,

source

pub fn has_class(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool

source

pub fn set_atomic_attribute( &self, local_name: &LocalName, value: DOMString, can_gc: CanGc, )

source

pub fn has_attribute(&self, local_name: &LocalName) -> bool

source

pub fn set_bool_attribute( &self, local_name: &LocalName, value: bool, can_gc: CanGc, )

source

pub fn get_url_attribute(&self, local_name: &LocalName) -> USVString

source

pub fn set_url_attribute( &self, local_name: &LocalName, value: USVString, can_gc: CanGc, )

source

pub fn get_string_attribute(&self, local_name: &LocalName) -> DOMString

source

pub fn set_string_attribute( &self, local_name: &LocalName, value: DOMString, can_gc: CanGc, )

source

fn get_nullable_string_attribute( &self, local_name: &LocalName, ) -> Option<DOMString>

Used for string attribute reflections where absence of the attribute returns null, e.g. element.ariaLabel returning null when the aria-label attribute is absent.

source

fn set_nullable_string_attribute( &self, local_name: &LocalName, value: Option<DOMString>, can_gc: CanGc, )

Used for string attribute reflections where setting null/undefined removes the attribute, e.g. element.ariaLabel = null removing the aria-label attribute.

source

pub fn get_tokenlist_attribute(&self, local_name: &LocalName) -> Vec<Atom>

source

pub fn set_tokenlist_attribute( &self, local_name: &LocalName, value: DOMString, can_gc: CanGc, )

source

pub fn set_atomic_tokenlist_attribute( &self, local_name: &LocalName, tokens: Vec<Atom>, can_gc: CanGc, )

source

pub fn get_int_attribute(&self, local_name: &LocalName, default: i32) -> i32

source

pub fn set_int_attribute( &self, local_name: &LocalName, value: i32, can_gc: CanGc, )

source

pub fn get_uint_attribute(&self, local_name: &LocalName, default: u32) -> u32

source

pub fn set_uint_attribute( &self, local_name: &LocalName, value: u32, can_gc: CanGc, )

source

pub fn will_mutate_attr(&self, attr: &Attr)

source

pub fn insert_adjacent( &self, where_: AdjacentPosition, node: &Node, ) -> Result<Option<Root<Dom<Node>>>, Error>

source

pub fn scroll(&self, x_: f64, y_: f64, behavior: ScrollBehavior, can_gc: CanGc)

source

pub fn parse_fragment( &self, markup: DOMString, can_gc: CanGc, ) -> Result<Root<Dom<DocumentFragment>>, Error>

source

pub fn fragment_parsing_context( owner_doc: &Document, element: Option<&Self>, can_gc: CanGc, ) -> Root<Dom<Self>>

source

pub fn fullscreen_element_ready_check(&self) -> bool

source

pub fn is_in_same_home_subtree<T>(&self, other: &T) -> bool

source

pub fn get_id(&self) -> Option<Atom>

source

pub fn get_name(&self) -> Option<Atom>

source

fn is_sequentially_focusable(&self) -> bool

source

pub(crate) fn update_sequentially_focusable_status(&self, can_gc: CanGc)

source

pub fn get_element_internals(&self) -> Option<Root<Dom<ElementInternals>>>

source

pub fn ensure_element_internals(&self) -> Root<Dom<ElementInternals>>

source§

impl Element

source

fn client_rect(&self, can_gc: CanGc) -> Rect<i32>

source

pub fn as_maybe_activatable(&self) -> Option<&dyn Activatable>

source

pub fn as_stylesheet_owner(&self) -> Option<&dyn StylesheetOwner>

source

pub fn as_maybe_validatable(&self) -> Option<&dyn Validatable>

source

pub fn is_invalid(&self, needs_update: bool) -> bool

source

pub fn is_instance_validatable(&self) -> bool

source

pub fn init_state_for_internals(&self)

source

pub fn click_in_progress(&self) -> bool

source

pub fn set_click_in_progress(&self, click: bool)

source

pub fn nearest_activable_element(&self) -> Option<Root<Dom<Element>>>

source

pub fn get_lang(&self) -> String

source

pub fn state(&self) -> ElementState

source

pub fn set_state(&self, which: ElementState, value: bool)

source

pub fn set_active_state(&self, value: bool)

source

pub fn focus_state(&self) -> bool

source

pub fn set_focus_state(&self, value: bool)

source

pub fn hover_state(&self) -> bool

source

pub fn set_hover_state(&self, value: bool)

source

pub fn enabled_state(&self) -> bool

source

pub fn set_enabled_state(&self, value: bool)

source

pub fn disabled_state(&self) -> bool

source

pub fn set_disabled_state(&self, value: bool)

source

pub fn read_write_state(&self) -> bool

source

pub fn set_read_write_state(&self, value: bool)

source

pub fn placeholder_shown_state(&self) -> bool

source

pub fn set_placeholder_shown_state(&self, value: bool)

source

pub fn set_target_state(&self, value: bool)

source

pub fn set_fullscreen_state(&self, value: bool)

source

pub fn is_connected(&self) -> bool

source

pub fn cannot_navigate(&self) -> bool

source§

impl Element

Trait Implementations§

source§

impl Castable for Element

source§

fn is<T>(&self) -> bool
where T: DerivedFrom<Self>,

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

fn upcast<T>(&self) -> &T
where T: Castable, Self: DerivedFrom<T>,

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

fn downcast<T>(&self) -> Option<&T>
where T: DerivedFrom<Self>,

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

impl Debug for Element

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DomObject for Element

source§

fn reflector(&self) -> &Reflector

Returns the receiver’s reflector.
source§

fn global(&self) -> Root<Dom<GlobalScope>>
where Self: Sized,

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

impl DomObjectWrap for Element

source§

const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>, _: CanGc) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::ElementBinding::Element_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::element::Element>, script_runtime::CanGc) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::element::Element>>}

Function pointer to the general wrap function type
source§

impl ElementMethods<DomTypeHolder> for Element

source§

fn GetInnerHTML(&self) -> Result<DOMString, Error>

source§

fn SetInnerHTML(&self, value: DOMString, can_gc: CanGc) -> Result<(), Error>

source§

fn GetOuterHTML(&self) -> Result<DOMString, Error>

source§

fn SetOuterHTML(&self, value: DOMString, can_gc: CanGc) -> Result<(), Error>

source§

fn GetShadowRoot(&self) -> Option<Root<Dom<ShadowRoot>>>

source§

fn GetNamespaceURI(&self) -> Option<DOMString>

source§

fn LocalName(&self) -> DOMString

source§

fn GetPrefix(&self) -> Option<DOMString>

source§

fn TagName(&self) -> DOMString

source§

fn Id(&self) -> DOMString

source§

fn SetId(&self, id: DOMString, can_gc: CanGc)

source§

fn ClassName(&self) -> DOMString

source§

fn SetClassName(&self, class: DOMString, can_gc: CanGc)

source§

fn ClassList(&self) -> Root<Dom<DOMTokenList>>

source§

fn Attributes(&self) -> Root<Dom<NamedNodeMap>>

source§

fn HasAttributes(&self) -> bool

source§

fn GetAttributeNames(&self) -> Vec<DOMString>

source§

fn GetAttribute(&self, name: DOMString) -> Option<DOMString>

source§

fn GetAttributeNS( &self, namespace: Option<DOMString>, local_name: DOMString, ) -> Option<DOMString>

source§

fn GetAttributeNode(&self, name: DOMString) -> Option<Root<Dom<Attr>>>

source§

fn GetAttributeNodeNS( &self, namespace: Option<DOMString>, local_name: DOMString, ) -> Option<Root<Dom<Attr>>>

source§

fn ToggleAttribute( &self, name: DOMString, force: Option<bool>, can_gc: CanGc, ) -> Result<bool, Error>

source§

fn SetAttribute( &self, name: DOMString, value: DOMString, can_gc: CanGc, ) -> Result<(), Error>

source§

fn SetAttributeNS( &self, namespace: Option<DOMString>, qualified_name: DOMString, value: DOMString, can_gc: CanGc, ) -> Result<(), Error>

source§

fn SetAttributeNode( &self, attr: &Attr, ) -> Result<Option<Root<Dom<Attr>>>, Error>

source§

fn SetAttributeNodeNS( &self, attr: &Attr, ) -> Result<Option<Root<Dom<Attr>>>, Error>

source§

fn RemoveAttribute(&self, name: DOMString)

source§

fn RemoveAttributeNS(&self, namespace: Option<DOMString>, local_name: DOMString)

source§

fn RemoveAttributeNode(&self, attr: &Attr) -> Result<Root<Dom<Attr>>, Error>

source§

fn HasAttribute(&self, name: DOMString) -> bool

source§

fn HasAttributeNS( &self, namespace: Option<DOMString>, local_name: DOMString, ) -> bool

source§

fn GetElementsByTagName( &self, localname: DOMString, ) -> Root<Dom<HTMLCollection>>

source§

fn GetElementsByTagNameNS( &self, maybe_ns: Option<DOMString>, localname: DOMString, ) -> Root<Dom<HTMLCollection>>

source§

fn GetElementsByClassName( &self, classes: DOMString, ) -> Root<Dom<HTMLCollection>>

source§

fn GetClientRects(&self, can_gc: CanGc) -> Root<Dom<DOMRectList>>

source§

fn GetBoundingClientRect(&self, can_gc: CanGc) -> Root<Dom<DOMRect>>

source§

fn Scroll(&self, options: &ScrollToOptions, can_gc: CanGc)

source§

fn Scroll_(&self, x: f64, y: f64, can_gc: CanGc)

source§

fn ScrollTo(&self, options: &ScrollToOptions)

source§

fn ScrollTo_(&self, x: f64, y: f64)

source§

fn ScrollBy(&self, options: &ScrollToOptions, can_gc: CanGc)

source§

fn ScrollBy_(&self, x: f64, y: f64, can_gc: CanGc)

source§

fn ScrollTop(&self, can_gc: CanGc) -> f64

source§

fn SetScrollTop(&self, y_: f64, can_gc: CanGc)

source§

fn ScrollLeft(&self, can_gc: CanGc) -> f64

source§

fn SetScrollLeft(&self, x_: f64, can_gc: CanGc)

source§

fn ScrollWidth(&self, can_gc: CanGc) -> i32

source§

fn ScrollHeight(&self, can_gc: CanGc) -> i32

source§

fn ClientTop(&self, can_gc: CanGc) -> i32

source§

fn ClientLeft(&self, can_gc: CanGc) -> i32

source§

fn ClientWidth(&self, can_gc: CanGc) -> i32

source§

fn ClientHeight(&self, can_gc: CanGc) -> i32

source§

fn GetPreviousElementSibling(&self) -> Option<Root<Dom<Element>>>

source§

fn GetNextElementSibling(&self) -> Option<Root<Dom<Element>>>

source§

fn Children(&self) -> Root<Dom<HTMLCollection>>

source§

fn GetFirstElementChild(&self) -> Option<Root<Dom<Element>>>

source§

fn GetLastElementChild(&self) -> Option<Root<Dom<Element>>>

source§

fn ChildElementCount(&self) -> u32

source§

fn Prepend(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> Result<(), Error>

source§

fn Append(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> Result<(), Error>

source§

fn ReplaceChildren( &self, nodes: Vec<NodeOrString>, can_gc: CanGc, ) -> Result<(), Error>

source§

fn QuerySelector( &self, selectors: DOMString, ) -> Result<Option<Root<Dom<Element>>>, Error>

source§

fn QuerySelectorAll( &self, selectors: DOMString, ) -> Result<Root<Dom<NodeList>>, Error>

source§

fn Before(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> Result<(), Error>

source§

fn After(&self, nodes: Vec<NodeOrString>, can_gc: CanGc) -> Result<(), Error>

source§

fn ReplaceWith( &self, nodes: Vec<NodeOrString>, can_gc: CanGc, ) -> Result<(), Error>

source§

fn Remove(&self)

source§

fn Matches(&self, selectors: DOMString) -> Result<bool, Error>

source§

fn WebkitMatchesSelector(&self, selectors: DOMString) -> Result<bool, Error>

source§

fn Closest( &self, selectors: DOMString, ) -> Result<Option<Root<Dom<Element>>>, Error>

source§

fn InsertAdjacentElement( &self, where_: DOMString, element: &Element, ) -> Result<Option<Root<Dom<Element>>>, Error>

source§

fn InsertAdjacentText( &self, where_: DOMString, data: DOMString, can_gc: CanGc, ) -> Result<(), Error>

source§

fn InsertAdjacentHTML( &self, position: DOMString, text: DOMString, can_gc: CanGc, ) -> Result<(), Error>

source§

fn EnterFormalActivationState(&self) -> Result<(), Error>

source§

fn ExitFormalActivationState(&self) -> Result<(), Error>

source§

fn RequestFullscreen(&self, can_gc: CanGc) -> Rc<Promise>

source§

fn AttachShadow( &self, init: &ShadowRootInit, ) -> Result<Root<Dom<ShadowRoot>>, Error>

source§

fn GetRole(&self) -> Option<DOMString>

source§

fn SetRole(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaAtomic(&self) -> Option<DOMString>

source§

fn SetAriaAtomic(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaAutoComplete(&self) -> Option<DOMString>

source§

fn SetAriaAutoComplete(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaBrailleLabel(&self) -> Option<DOMString>

source§

fn SetAriaBrailleLabel(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaBrailleRoleDescription(&self) -> Option<DOMString>

source§

fn SetAriaBrailleRoleDescription(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaBusy(&self) -> Option<DOMString>

source§

fn SetAriaBusy(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaChecked(&self) -> Option<DOMString>

source§

fn SetAriaChecked(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaColCount(&self) -> Option<DOMString>

source§

fn SetAriaColCount(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaColIndex(&self) -> Option<DOMString>

source§

fn SetAriaColIndex(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaColIndexText(&self) -> Option<DOMString>

source§

fn SetAriaColIndexText(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaColSpan(&self) -> Option<DOMString>

source§

fn SetAriaColSpan(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaCurrent(&self) -> Option<DOMString>

source§

fn SetAriaCurrent(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaDescription(&self) -> Option<DOMString>

source§

fn SetAriaDescription(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaDisabled(&self) -> Option<DOMString>

source§

fn SetAriaDisabled(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaExpanded(&self) -> Option<DOMString>

source§

fn SetAriaExpanded(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaHasPopup(&self) -> Option<DOMString>

source§

fn SetAriaHasPopup(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaHidden(&self) -> Option<DOMString>

source§

fn SetAriaHidden(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaInvalid(&self) -> Option<DOMString>

source§

fn SetAriaInvalid(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaKeyShortcuts(&self) -> Option<DOMString>

source§

fn SetAriaKeyShortcuts(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaLabel(&self) -> Option<DOMString>

source§

fn SetAriaLabel(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaLevel(&self) -> Option<DOMString>

source§

fn SetAriaLevel(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaLive(&self) -> Option<DOMString>

source§

fn SetAriaLive(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaModal(&self) -> Option<DOMString>

source§

fn SetAriaModal(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaMultiLine(&self) -> Option<DOMString>

source§

fn SetAriaMultiLine(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaMultiSelectable(&self) -> Option<DOMString>

source§

fn SetAriaMultiSelectable(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaOrientation(&self) -> Option<DOMString>

source§

fn SetAriaOrientation(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaPlaceholder(&self) -> Option<DOMString>

source§

fn SetAriaPlaceholder(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaPosInSet(&self) -> Option<DOMString>

source§

fn SetAriaPosInSet(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaPressed(&self) -> Option<DOMString>

source§

fn SetAriaPressed(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaReadOnly(&self) -> Option<DOMString>

source§

fn SetAriaReadOnly(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRelevant(&self) -> Option<DOMString>

source§

fn SetAriaRelevant(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRequired(&self) -> Option<DOMString>

source§

fn SetAriaRequired(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRoleDescription(&self) -> Option<DOMString>

source§

fn SetAriaRoleDescription(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRowCount(&self) -> Option<DOMString>

source§

fn SetAriaRowCount(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRowIndex(&self) -> Option<DOMString>

source§

fn SetAriaRowIndex(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRowIndexText(&self) -> Option<DOMString>

source§

fn SetAriaRowIndexText(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaRowSpan(&self) -> Option<DOMString>

source§

fn SetAriaRowSpan(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaSelected(&self) -> Option<DOMString>

source§

fn SetAriaSelected(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaSetSize(&self) -> Option<DOMString>

source§

fn SetAriaSetSize(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaSort(&self) -> Option<DOMString>

source§

fn SetAriaSort(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaValueMax(&self) -> Option<DOMString>

source§

fn SetAriaValueMax(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaValueMin(&self) -> Option<DOMString>

source§

fn SetAriaValueMin(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaValueNow(&self) -> Option<DOMString>

source§

fn SetAriaValueNow(&self, value: Option<DOMString>, can_gc: CanGc)

source§

fn GetAriaValueText(&self) -> Option<DOMString>

source§

fn SetAriaValueText(&self, value: Option<DOMString>, can_gc: CanGc)

source§

impl FormControlElementHelpers for Element

source§

impl HasParent for Element

source§

fn as_parent(&self) -> &Node

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

source§

type Parent = Node

source§

impl IDLInterface for Element

source§

fn derives(class: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.
source§

impl MallocSizeOf for Element

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

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

impl MutDomObject for Element

source§

unsafe fn init_reflector(&self, obj: *mut JSObject)

Initializes the Reflector Read more
source§

impl PartialEq for Element

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToJSValConvertible for Element

source§

unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)

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

impl Traceable for Element

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.
source§

impl VirtualMethods for Element

source§

fn super_type(&self) -> Option<&dyn VirtualMethods>

Returns self as the superclass of the implementation for this trait, if any.
source§

fn attribute_affects_presentational_hints(&self, attr: &Attr) -> bool

Returns true if given attribute attr affects style of the given element.
source§

fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation<'_>)

source§

fn parse_plain_attribute(&self, name: &LocalName, value: DOMString) -> AttrValue

Returns the right AttrValue variant for the attribute with name name on this element.
source§

fn bind_to_tree(&self, context: &BindContext)

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

fn unbind_from_tree(&self, context: &UnbindContext<'_>)

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
source§

fn children_changed(&self, mutation: &ChildrenMutation<'_>)

Called on the parent when its children are changed.
source§

fn adopting_steps(&self, old_doc: &Document)

source§

fn handle_event(&self, event: &Event)

Called during event dispatch after the bubbling phase completes.
source§

fn cloning_steps( &self, copy: &Node, maybe_doc: Option<&Document>, clone_children: CloneChildrenFlag, )

source§

fn pop(&self)

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

impl DerivedFrom<Element> for Element

source§

impl DerivedFrom<Element> for HTMLAnchorElement

source§

impl DerivedFrom<Element> for HTMLAreaElement

source§

impl DerivedFrom<Element> for HTMLAudioElement

source§

impl DerivedFrom<Element> for HTMLBRElement

source§

impl DerivedFrom<Element> for HTMLBaseElement

source§

impl DerivedFrom<Element> for HTMLBodyElement

source§

impl DerivedFrom<Element> for HTMLButtonElement

source§

impl DerivedFrom<Element> for HTMLCanvasElement

source§

impl DerivedFrom<Element> for HTMLDListElement

source§

impl DerivedFrom<Element> for HTMLDataElement

source§

impl DerivedFrom<Element> for HTMLDataListElement

source§

impl DerivedFrom<Element> for HTMLDetailsElement

source§

impl DerivedFrom<Element> for HTMLDialogElement

source§

impl DerivedFrom<Element> for HTMLDirectoryElement

source§

impl DerivedFrom<Element> for HTMLDivElement

source§

impl DerivedFrom<Element> for HTMLElement

source§

impl DerivedFrom<Element> for HTMLEmbedElement

source§

impl DerivedFrom<Element> for HTMLFieldSetElement

source§

impl DerivedFrom<Element> for HTMLFontElement

source§

impl DerivedFrom<Element> for HTMLFormElement

source§

impl DerivedFrom<Element> for HTMLFrameElement

source§

impl DerivedFrom<Element> for HTMLFrameSetElement

source§

impl DerivedFrom<Element> for HTMLHRElement

source§

impl DerivedFrom<Element> for HTMLHeadElement

source§

impl DerivedFrom<Element> for HTMLHeadingElement

source§

impl DerivedFrom<Element> for HTMLHtmlElement

source§

impl DerivedFrom<Element> for HTMLIFrameElement

source§

impl DerivedFrom<Element> for HTMLImageElement

source§

impl DerivedFrom<Element> for HTMLInputElement

source§

impl DerivedFrom<Element> for HTMLLIElement

source§

impl DerivedFrom<Element> for HTMLLabelElement

source§

impl DerivedFrom<Element> for HTMLLegendElement

source§

impl DerivedFrom<Element> for HTMLLinkElement

source§

impl DerivedFrom<Element> for HTMLMapElement

source§

impl DerivedFrom<Element> for HTMLMediaElement

source§

impl DerivedFrom<Element> for HTMLMenuElement

source§

impl DerivedFrom<Element> for HTMLMetaElement

source§

impl DerivedFrom<Element> for HTMLMeterElement

source§

impl DerivedFrom<Element> for HTMLModElement

source§

impl DerivedFrom<Element> for HTMLOListElement

source§

impl DerivedFrom<Element> for HTMLObjectElement

source§

impl DerivedFrom<Element> for HTMLOptGroupElement

source§

impl DerivedFrom<Element> for HTMLOptionElement

source§

impl DerivedFrom<Element> for HTMLOutputElement

source§

impl DerivedFrom<Element> for HTMLParagraphElement

source§

impl DerivedFrom<Element> for HTMLParamElement

source§

impl DerivedFrom<Element> for HTMLPictureElement

source§

impl DerivedFrom<Element> for HTMLPreElement

source§

impl DerivedFrom<Element> for HTMLProgressElement

source§

impl DerivedFrom<Element> for HTMLQuoteElement

source§

impl DerivedFrom<Element> for HTMLScriptElement

source§

impl DerivedFrom<Element> for HTMLSelectElement

source§

impl DerivedFrom<Element> for HTMLSourceElement

source§

impl DerivedFrom<Element> for HTMLSpanElement

source§

impl DerivedFrom<Element> for HTMLStyleElement

source§

impl DerivedFrom<Element> for HTMLTableCaptionElement

source§

impl DerivedFrom<Element> for HTMLTableCellElement

source§

impl DerivedFrom<Element> for HTMLTableColElement

source§

impl DerivedFrom<Element> for HTMLTableElement

source§

impl DerivedFrom<Element> for HTMLTableRowElement

source§

impl DerivedFrom<Element> for HTMLTableSectionElement

source§

impl DerivedFrom<Element> for HTMLTemplateElement

source§

impl DerivedFrom<Element> for HTMLTextAreaElement

source§

impl DerivedFrom<Element> for HTMLTimeElement

source§

impl DerivedFrom<Element> for HTMLTitleElement

source§

impl DerivedFrom<Element> for HTMLTrackElement

source§

impl DerivedFrom<Element> for HTMLUListElement

source§

impl DerivedFrom<Element> for HTMLUnknownElement

source§

impl DerivedFrom<Element> for HTMLVideoElement

source§

impl DerivedFrom<Element> for SVGElement

source§

impl DerivedFrom<Element> for SVGGraphicsElement

source§

impl DerivedFrom<Element> for SVGSVGElement

source§

impl DerivedFrom<EventTarget> for Element

source§

impl DerivedFrom<Node> for Element

source§

impl Eq for Element

Auto Trait Implementations§

§

impl !Freeze for Element

§

impl !RefUnwindSafe for Element

§

impl !Send for Element

§

impl !Sync for Element

§

impl Unpin for Element

§

impl !UnwindSafe for Element

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> Filterable for T

source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

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

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ThisReflector for T
where T: DomObject,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T