[][src]Trait stdweb::web::IHtmlElement

pub trait IHtmlElement: IElement {
    fn focus(&self) { ... }
fn blur(&self) { ... }
fn dataset(&self) -> StringMap { ... }
fn get_bounding_client_rect(&self) -> Rect { ... }
fn offset_width(&self) -> i32 { ... }
fn offset_height(&self) -> i32 { ... }
fn inner_text(&self) -> String { ... } }

The IHtmlElement interface represents any HTML element.

(JavaScript docs)

Provided methods

fn focus(&self)

Sets focus on the specified element, if it can be focused.

(JavaScript docs)

fn blur(&self)

Removes keyboard focus from the current element.

(JavaScript docs)

fn dataset(&self) -> StringMap

Allows access, both in reading and writing, to all of the custom data attributes (data-*) set on the element, either in HTML or in the DOM.

(JavaScript docs)

fn get_bounding_client_rect(&self) -> Rect

Returns the size of an element and its position relative to the viewport. (JavaScript docs)

fn offset_width(&self) -> i32

Returns the layout width of an element. Typically, an element's offsetWidth is a measurement which includes the element borders, the element horizontal padding, the element vertical scrollbar (if present, if rendered) and the element CSS width.

fn offset_height(&self) -> i32

Returns the height of the element including vertical padding and borders, as an integer.

fn inner_text(&self) -> String

A property which represents the "rendered" text content of a node and its descendants. It approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied to the clipboard.

This feature was originally introduced by Internet Explorer, and was formally specified in the HTML standard in 2016 after being adopted by all major browser vendors.

(JavaScript docs)

Loading content...

Implementors

impl IHtmlElement for CanvasElement[src]

impl IHtmlElement for ImageElement[src]

impl IHtmlElement for InputElement[src]

impl IHtmlElement for OptionElement[src]

impl IHtmlElement for SelectElement[src]

impl IHtmlElement for SlotElement[src]

impl IHtmlElement for TemplateElement[src]

impl IHtmlElement for TextAreaElement[src]

impl IHtmlElement for HtmlElement[src]

Loading content...