pub trait DOMElementExt: 'static {
Show 119 methods fn blur(&self); fn closest(&self, selectors: &str) -> Result<DOMElement, Error>; fn focus(&self); fn attribute(&self, name: &str) -> Option<GString>; fn attribute_node(&self, name: &str) -> Option<DOMAttr>; fn attribute_node_ns(
        &self,
        namespaceURI: &str,
        localName: &str
    ) -> Option<DOMAttr>; fn attribute_ns(&self, namespaceURI: &str, localName: &str) -> Option<GString>; fn attributes(&self) -> Option<DOMNamedNodeMap>; fn bounding_client_rect(&self) -> Option<DOMClientRect>; fn child_element_count(&self) -> c_ulong; fn children(&self) -> Option<DOMHTMLCollection>; fn class_list(&self) -> Option<DOMDOMTokenList>; fn class_name(&self) -> Option<GString>; fn client_height(&self) -> f64; fn client_left(&self) -> f64; fn client_rects(&self) -> Option<DOMClientRectList>; fn client_top(&self) -> f64; fn client_width(&self) -> f64; fn elements_by_class_name(&self, class_name: &str) -> Option<DOMNodeList>; fn elements_by_class_name_as_html_collection(
        &self,
        name: &str
    ) -> Option<DOMHTMLCollection>; fn elements_by_tag_name(&self, tag_name: &str) -> Option<DOMNodeList>; fn elements_by_tag_name_as_html_collection(
        &self,
        name: &str
    ) -> Option<DOMHTMLCollection>; fn elements_by_tag_name_ns(
        &self,
        namespace_uri: &str,
        tag_name: &str
    ) -> Option<DOMNodeList>; fn elements_by_tag_name_ns_as_html_collection(
        &self,
        namespaceURI: &str,
        localName: &str
    ) -> Option<DOMHTMLCollection>; fn first_element_child(&self) -> Option<DOMElement>; fn id(&self) -> Option<GString>; fn inner_html(&self) -> Option<GString>; fn last_element_child(&self) -> Option<DOMElement>; fn local_name(&self) -> Option<GString>; fn namespace_uri(&self) -> Option<GString>; fn next_element_sibling(&self) -> Option<DOMElement>; fn offset_height(&self) -> f64; fn offset_left(&self) -> f64; fn offset_parent(&self) -> Option<DOMElement>; fn offset_top(&self) -> f64; fn offset_width(&self) -> f64; fn outer_html(&self) -> Option<GString>; fn prefix(&self) -> Option<GString>; fn previous_element_sibling(&self) -> Option<DOMElement>; fn scroll_height(&self) -> c_long; fn scroll_left(&self) -> c_long; fn scroll_top(&self) -> c_long; fn scroll_width(&self) -> c_long; fn style(&self) -> Option<DOMCSSStyleDeclaration>; fn tag_name(&self) -> Option<GString>; fn webkit_region_overset(&self) -> Option<GString>; fn has_attribute(&self, name: &str) -> bool; fn has_attribute_ns(&self, namespaceURI: &str, localName: &str) -> bool; fn has_attributes(&self) -> bool; fn html_input_element_get_auto_filled(&self) -> bool; fn html_input_element_is_user_edited(&self) -> bool; fn html_input_element_set_auto_filled(&self, auto_filled: bool); fn html_input_element_set_editing_value(&self, value: &str); fn insert_adjacent_element(
        &self,
        where_: &str,
        element: &impl IsA<DOMElement>
    ) -> Result<DOMElement, Error>; fn insert_adjacent_html(&self, where_: &str, html: &str) -> Result<(), Error>; fn insert_adjacent_text(&self, where_: &str, text: &str) -> Result<(), Error>; fn matches(&self, selectors: &str) -> Result<(), Error>; fn query_selector(
        &self,
        selectors: &str
    ) -> Result<Option<DOMElement>, Error>; fn query_selector_all(&self, selectors: &str) -> Result<DOMNodeList, Error>; fn remove(&self) -> Result<(), Error>; fn remove_attribute(&self, name: &str); fn remove_attribute_node(
        &self,
        oldAttr: &impl IsA<DOMAttr>
    ) -> Result<DOMAttr, Error>; fn remove_attribute_ns(&self, namespaceURI: &str, localName: &str); fn request_pointer_lock(&self); fn scroll_by_lines(&self, lines: c_long); fn scroll_by_pages(&self, pages: c_long); fn scroll_into_view(&self, alignWithTop: bool); fn scroll_into_view_if_needed(&self, centerIfNeeded: bool); fn set_attribute(&self, name: &str, value: &str) -> Result<(), Error>; fn set_attribute_node(
        &self,
        newAttr: &impl IsA<DOMAttr>
    ) -> Result<DOMAttr, Error>; fn set_attribute_node_ns(
        &self,
        newAttr: &impl IsA<DOMAttr>
    ) -> Result<DOMAttr, Error>; fn set_attribute_ns(
        &self,
        namespaceURI: Option<&str>,
        qualifiedName: &str,
        value: &str
    ) -> Result<(), Error>; fn set_class_name(&self, value: &str); fn set_id(&self, value: &str); fn set_inner_html(&self, value: &str) -> Result<(), Error>; fn set_outer_html(&self, value: &str) -> Result<(), Error>; fn set_scroll_left(&self, value: c_long); fn set_scroll_top(&self, value: c_long); fn webkit_matches_selector(&self, selectors: &str) -> Result<(), Error>; fn webkit_request_fullscreen(&self); fn get_property_children(&self) -> Option<DOMHTMLCollection>; fn get_property_inner_html(&self) -> Option<GString>; fn set_property_inner_html(&self, inner_html: Option<&str>); fn get_property_local_name(&self) -> Option<GString>; fn get_property_namespace_uri(&self) -> Option<GString>; fn get_property_outer_html(&self) -> Option<GString>; fn set_property_outer_html(&self, outer_html: Option<&str>); fn get_property_prefix(&self) -> Option<GString>; fn connect_attributes_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_child_element_count_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_children_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_class_list_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_class_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_client_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_client_left_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_client_top_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_client_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_first_element_child_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_inner_html_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_last_element_child_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_local_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_namespace_uri_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_next_element_sibling_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_offset_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_offset_left_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_offset_parent_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_offset_top_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_offset_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_outer_html_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_prefix_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_previous_element_sibling_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_scroll_height_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_scroll_left_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_scroll_top_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_scroll_width_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_style_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_tag_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_webkit_region_overset_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all DOMElement methods.

Implementors

DOMElement, DOMHTMLElement

Required Methods

Deprecated since 2.22

Use JavaScriptCore API instead

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

selectors

A gchar

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Returns

A DOMAttr

Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

localName

A gchar

Returns

A DOMAttr

Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

localName

A gchar

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMNamedNodeMap

Available on crate feature v2_18 only.

Returns a DOMClientRect representing the size and position of self relative to the viewport.

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMClientRect

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gulong

Available on crate feature v2_10 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMHTMLCollection

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMDOMTokenList

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Available on crate feature v2_18 only.

Returns a collection of DOMClientRect objects, each of which describe the size and position of a CSS border box relative to the viewport.

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMClientRectList

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Available on crate feature v2_12 only.
Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Returns

A DOMHTMLCollection

Available on crate feature v2_12 only.
Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Returns

A DOMHTMLCollection

Deprecated since 2.12

Use elements_by_tag_name_ns_as_html_collection() instead.

namespace_uri

a gchar with the namespace URI

tag_name

a gchar with the tag name

Returns

a DOMNodeList

Available on crate feature v2_12 only.
Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

localName

A gchar

Returns

A DOMHTMLCollection

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Available on crate feature v2_8 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMElement

Available on crate feature v2_14 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Available on crate feature v2_14 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gdouble

Available on crate feature v2_8 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Available on crate feature v2_14 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A DOMCSSStyleDeclaration

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gchar

CSS Regions support has been removed. This function does nothing.

Deprecated since 2.20
Returns

None

Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Returns

A gboolean

Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

localName

A gchar

Returns

A gboolean

Deprecated since 2.22

Use JavaScriptCore API instead

Returns

A gboolean

Available on crate feature v2_22 only.

Get whether self is an HTML text input element that has been edited by a user action.

Returns

whether self has been edited by a user action.

Available on crate feature v2_22 only.

Set whether the element is an HTML input element that has been filled automatically. If self is not an HTML input element this function does nothing.

auto_filled

value to set

Available on crate feature v2_22 only.

Set the value of an HTML input element as if it had been edited by the user, triggering a change event. If self is not an HTML input element this function does nothing.

value

the text to set

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

where_

A gchar

element

A DOMElement

Returns

A DOMElement

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

where_

A gchar

html

A gchar

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

where_

A gchar

text

A gchar

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

selectors

A gchar

Returns

A gboolean

Deprecated since 2.22

Use JavaScriptCore API instead

selectors

A gchar

Returns

A DOMElement

Deprecated since 2.22

Use JavaScriptCore API instead

selectors

A gchar

Returns

A DOMNodeList

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

oldAttr

A DOMAttr

Returns

A DOMAttr

Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

localName

A gchar

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Deprecated since 2.22

Use JavaScriptCore API instead

lines

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

pages

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

alignWithTop

A gboolean

Deprecated since 2.22

Use JavaScriptCore API instead

centerIfNeeded

A gboolean

Deprecated since 2.22

Use JavaScriptCore API instead

name

A gchar

value

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

newAttr

A DOMAttr

Returns

A DOMAttr

Deprecated since 2.22

Use JavaScriptCore API instead

newAttr

A DOMAttr

Returns

A DOMAttr

Deprecated since 2.22

Use JavaScriptCore API instead

namespaceURI

A gchar

qualifiedName

A gchar

value

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

value

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

value

A gchar

Available on crate feature v2_8 only.
Deprecated since 2.22

Use JavaScriptCore API instead

value

A gchar

Available on crate feature v2_8 only.
Deprecated since 2.22

Use JavaScriptCore API instead

value

A gchar

Deprecated since 2.22

Use JavaScriptCore API instead

value

A glong

Deprecated since 2.22

Use JavaScriptCore API instead

value

A glong

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

selectors

A gchar

Returns

A gboolean

Available on crate feature v2_16 only.
Deprecated since 2.22

Use JavaScriptCore API instead

Available on crate feature v2_16 only.

Implementors