HTMLFrameSetElement

Struct HTMLFrameSetElement 

Source
pub struct HTMLFrameSetElement { /* private fields */ }
Expand description

The HTMLFrameSetElement class. HTMLFrameSetElement

Implementations§

Source§

impl HTMLFrameSetElement

Source

pub fn cols(&self) -> JsString

Getter of the cols attribute. HTMLFrameSetElement.cols

Source

pub fn set_cols(&mut self, value: &JsString)

Setter of the cols attribute. HTMLFrameSetElement.cols

Source§

impl HTMLFrameSetElement

Source

pub fn rows(&self) -> JsString

Getter of the rows attribute. HTMLFrameSetElement.rows

Source

pub fn set_rows(&mut self, value: &JsString)

Setter of the rows attribute. HTMLFrameSetElement.rows

Source§

impl HTMLFrameSetElement

Source

pub fn onportalactivate(&self) -> Any

Getter of the onportalactivate attribute. HTMLFrameSetElement.onportalactivate

Source

pub fn set_onportalactivate(&mut self, value: &Any)

Setter of the onportalactivate attribute. HTMLFrameSetElement.onportalactivate

Source§

impl HTMLFrameSetElement

Source

pub fn new() -> HTMLFrameSetElement

The new HTMLFrameSetElement(..) constructor, creating a new HTMLFrameSetElement instance

Methods from Deref<Target = HTMLElement>§

Source

pub fn title(&self) -> JsString

Getter of the title attribute. HTMLElement.title

Source

pub fn set_title(&mut self, value: &JsString)

Setter of the title attribute. HTMLElement.title

Source

pub fn lang(&self) -> JsString

Getter of the lang attribute. HTMLElement.lang

Source

pub fn set_lang(&mut self, value: &JsString)

Setter of the lang attribute. HTMLElement.lang

Source

pub fn translate(&self) -> bool

Getter of the translate attribute. HTMLElement.translate

Source

pub fn set_translate(&mut self, value: bool)

Setter of the translate attribute. HTMLElement.translate

Source

pub fn dir(&self) -> JsString

Getter of the dir attribute. HTMLElement.dir

Source

pub fn set_dir(&mut self, value: &JsString)

Setter of the dir attribute. HTMLElement.dir

Source

pub fn hidden(&self) -> Any

Getter of the hidden attribute. HTMLElement.hidden

Source

pub fn set_hidden(&mut self, value: &Any)

Setter of the hidden attribute. HTMLElement.hidden

Source

pub fn inert(&self) -> bool

Getter of the inert attribute. HTMLElement.inert

Source

pub fn set_inert(&mut self, value: bool)

Setter of the inert attribute. HTMLElement.inert

Source

pub fn access_key(&self) -> JsString

Getter of the accessKey attribute. HTMLElement.accessKey

Source

pub fn set_access_key(&mut self, value: &JsString)

Setter of the accessKey attribute. HTMLElement.accessKey

Source

pub fn access_key_label(&self) -> JsString

Getter of the accessKeyLabel attribute. HTMLElement.accessKeyLabel

Source

pub fn draggable(&self) -> bool

Getter of the draggable attribute. HTMLElement.draggable

Source

pub fn set_draggable(&mut self, value: bool)

Setter of the draggable attribute. HTMLElement.draggable

Source

pub fn spellcheck(&self) -> bool

Getter of the spellcheck attribute. HTMLElement.spellcheck

Source

pub fn set_spellcheck(&mut self, value: bool)

Setter of the spellcheck attribute. HTMLElement.spellcheck

Source

pub fn writing_suggestions(&self) -> JsString

Getter of the writingSuggestions attribute. HTMLElement.writingSuggestions

Source

pub fn set_writing_suggestions(&mut self, value: &JsString)

Setter of the writingSuggestions attribute. HTMLElement.writingSuggestions

Source

pub fn autocapitalize(&self) -> JsString

Getter of the autocapitalize attribute. HTMLElement.autocapitalize

Source

pub fn set_autocapitalize(&mut self, value: &JsString)

Setter of the autocapitalize attribute. HTMLElement.autocapitalize

Source

pub fn autocorrect(&self) -> bool

Getter of the autocorrect attribute. HTMLElement.autocorrect

Source

pub fn set_autocorrect(&mut self, value: bool)

Setter of the autocorrect attribute. HTMLElement.autocorrect

Source

pub fn inner_text(&self) -> JsString

Getter of the innerText attribute. HTMLElement.innerText

Source

pub fn set_inner_text(&mut self, value: &JsString)

Setter of the innerText attribute. HTMLElement.innerText

Source

pub fn outer_text(&self) -> JsString

Getter of the outerText attribute. HTMLElement.outerText

Source

pub fn set_outer_text(&mut self, value: &JsString)

Setter of the outerText attribute. HTMLElement.outerText

Source

pub fn popover(&self) -> JsString

Getter of the popover attribute. HTMLElement.popover

Source

pub fn set_popover(&mut self, value: &JsString)

Setter of the popover attribute. HTMLElement.popover

Source

pub fn scroll_parent(&self) -> Element

Getter of the scrollParent attribute. HTMLElement.scrollParent

Source

pub fn offset_parent(&self) -> Element

Getter of the offsetParent attribute. HTMLElement.offsetParent

Source

pub fn offset_top(&self) -> i32

Getter of the offsetTop attribute. HTMLElement.offsetTop

Source

pub fn offset_left(&self) -> i32

Getter of the offsetLeft attribute. HTMLElement.offsetLeft

Source

pub fn offset_width(&self) -> i32

Getter of the offsetWidth attribute. HTMLElement.offsetWidth

Source

pub fn offset_height(&self) -> i32

Getter of the offsetHeight attribute. HTMLElement.offsetHeight

Source

pub fn edit_context(&self) -> EditContext

Getter of the editContext attribute. HTMLElement.editContext

Source

pub fn set_edit_context(&mut self, value: &EditContext)

Setter of the editContext attribute. HTMLElement.editContext

Source

pub fn style(&self) -> CSSStyleProperties

Getter of the style attribute. HTMLElement.style

Examples found in repository?
examples/button.rs (line 18)
4fn main() {
5    let con = Console::get();
6    let document = window().document();
7    let bodies = document.get_elements_by_tag_name(&"body".into());
8    if bodies.length() == 0 {
9        con.log(&["I Ain't got Nobody!".into()]);
10        return;
11    }
12    let body = bodies.item(0);
13    let mut button = document
14        .create_element(&"BUTTON".into())
15        .dyn_into::<HTMLButtonElement>()
16        .unwrap();
17
18    let style = button.style();
19    style.set_property(&"color".into(), &"red".into());
20    style.set_property(&"background-color".into(), &"#aaf".into());
21    style.set_property(&"border".into(), &"solid".into());
22
23    button.set_text_content(&"Click me".into());
24    button.add_event_listener(
25        &"click".into(),
26        &EventListener::from_closure(move |e: Event| {
27            let p = e.dyn_into::<PointerEvent>().unwrap();
28            con.log(&[p.client_x().into()]);
29            Undefined::VALUE
30        }),
31    );
32    body.append_child(button.dyn_ref::<Node>().unwrap());
33}
Source

pub fn onbeforexrselect(&self) -> Any

Getter of the onbeforexrselect attribute. HTMLElement.onbeforexrselect

Source

pub fn set_onbeforexrselect(&mut self, value: &Any)

Setter of the onbeforexrselect attribute. HTMLElement.onbeforexrselect

Source

pub fn virtual_keyboard_policy(&self) -> JsString

Getter of the virtualKeyboardPolicy attribute. HTMLElement.virtualKeyboardPolicy

Source

pub fn set_virtual_keyboard_policy(&mut self, value: &JsString)

Setter of the virtualKeyboardPolicy attribute. HTMLElement.virtualKeyboardPolicy

Source

pub fn dataset(&self) -> DOMStringMap

Getter of the dataset attribute. HTMLElement.dataset

Source

pub fn nonce(&self) -> JsString

Getter of the nonce attribute. HTMLElement.nonce

Source

pub fn set_nonce(&mut self, value: &JsString)

Setter of the nonce attribute. HTMLElement.nonce

Source

pub fn autofocus(&self) -> bool

Getter of the autofocus attribute. HTMLElement.autofocus

Source

pub fn set_autofocus(&mut self, value: bool)

Setter of the autofocus attribute. HTMLElement.autofocus

Source

pub fn tab_index(&self) -> i32

Getter of the tabIndex attribute. HTMLElement.tabIndex

Source

pub fn set_tab_index(&mut self, value: i32)

Setter of the tabIndex attribute. HTMLElement.tabIndex

Source

pub fn click(&self) -> Undefined

The click method. HTMLElement.click

Source

pub fn attach_internals(&self) -> ElementInternals

The attachInternals method. HTMLElement.attachInternals

Source

pub fn show_popover(&self) -> Undefined

The showPopover method. HTMLElement.showPopover

Source

pub fn show_popover_with_options( &self, options: &ShowPopoverOptions, ) -> Undefined

The showPopover method. HTMLElement.showPopover

Source

pub fn hide_popover(&self) -> Undefined

The hidePopover method. HTMLElement.hidePopover

Source

pub fn toggle_popover(&self) -> bool

The togglePopover method. HTMLElement.togglePopover

Source

pub fn toggle_popover_with_options(&self, options: &Any) -> bool

The togglePopover method. HTMLElement.togglePopover

Source

pub fn focus(&self) -> Undefined

The focus method. HTMLElement.focus

Source

pub fn focus_with_options(&self, options: &FocusOptions) -> Undefined

The focus method. HTMLElement.focus

Source

pub fn blur(&self) -> Undefined

The blur method. HTMLElement.blur

Methods from Deref<Target = Element>§

Source

pub fn namespace_uri(&self) -> JsString

Getter of the namespaceURI attribute. Element.namespaceURI

Source

pub fn prefix(&self) -> JsString

Getter of the prefix attribute. Element.prefix

Source

pub fn local_name(&self) -> JsString

Getter of the localName attribute. Element.localName

Source

pub fn tag_name(&self) -> JsString

Getter of the tagName attribute. Element.tagName

Source

pub fn id(&self) -> JsString

Getter of the id attribute. Element.id

Source

pub fn set_id(&mut self, value: &JsString)

Setter of the id attribute. Element.id

Source

pub fn class_name(&self) -> JsString

Getter of the className attribute. Element.className

Source

pub fn set_class_name(&mut self, value: &JsString)

Setter of the className attribute. Element.className

Source

pub fn class_list(&self) -> DOMTokenList

Getter of the classList attribute. Element.classList

Source

pub fn slot(&self) -> JsString

Getter of the slot attribute. Element.slot

Source

pub fn set_slot(&mut self, value: &JsString)

Setter of the slot attribute. Element.slot

Source

pub fn attributes(&self) -> NamedNodeMap

Getter of the attributes attribute. Element.attributes

Source

pub fn shadow_root(&self) -> ShadowRoot

Getter of the shadowRoot attribute. Element.shadowRoot

Source

pub fn custom_element_registry(&self) -> CustomElementRegistry

Getter of the customElementRegistry attribute. Element.customElementRegistry

Source

pub fn part(&self) -> DOMTokenList

Getter of the part attribute. Element.part

Source

pub fn scroll_top(&self) -> f64

Getter of the scrollTop attribute. Element.scrollTop

Source

pub fn set_scroll_top(&mut self, value: f64)

Setter of the scrollTop attribute. Element.scrollTop

Source

pub fn scroll_left(&self) -> f64

Getter of the scrollLeft attribute. Element.scrollLeft

Source

pub fn set_scroll_left(&mut self, value: f64)

Setter of the scrollLeft attribute. Element.scrollLeft

Source

pub fn scroll_width(&self) -> i32

Getter of the scrollWidth attribute. Element.scrollWidth

Source

pub fn scroll_height(&self) -> i32

Getter of the scrollHeight attribute. Element.scrollHeight

Source

pub fn client_top(&self) -> i32

Getter of the clientTop attribute. Element.clientTop

Source

pub fn client_left(&self) -> i32

Getter of the clientLeft attribute. Element.clientLeft

Source

pub fn client_width(&self) -> i32

Getter of the clientWidth attribute. Element.clientWidth

Source

pub fn client_height(&self) -> i32

Getter of the clientHeight attribute. Element.clientHeight

Source

pub fn current_css_zoom(&self) -> f64

Getter of the currentCSSZoom attribute. Element.currentCSSZoom

Source

pub fn element_timing(&self) -> JsString

Getter of the elementTiming attribute. Element.elementTiming

Source

pub fn set_element_timing(&mut self, value: &JsString)

Setter of the elementTiming attribute. Element.elementTiming

Source

pub fn onfullscreenchange(&self) -> Any

Getter of the onfullscreenchange attribute. Element.onfullscreenchange

Source

pub fn set_onfullscreenchange(&mut self, value: &Any)

Setter of the onfullscreenchange attribute. Element.onfullscreenchange

Source

pub fn onfullscreenerror(&self) -> Any

Getter of the onfullscreenerror attribute. Element.onfullscreenerror

Source

pub fn set_onfullscreenerror(&mut self, value: &Any)

Setter of the onfullscreenerror attribute. Element.onfullscreenerror

Source

pub fn inner_html(&self) -> Any

Getter of the innerHTML attribute. Element.innerHTML

Source

pub fn set_inner_html(&mut self, value: &Any)

Setter of the innerHTML attribute. Element.innerHTML

Source

pub fn outer_html(&self) -> Any

Getter of the outerHTML attribute. Element.outerHTML

Source

pub fn set_outer_html(&mut self, value: &Any)

Setter of the outerHTML attribute. Element.outerHTML

Source

pub fn region_overset(&self) -> JsString

Getter of the regionOverset attribute. Element.regionOverset

Source

pub fn children(&self) -> HTMLCollection

Getter of the children attribute. Element.children

Source

pub fn first_element_child(&self) -> Element

Getter of the firstElementChild attribute. Element.firstElementChild

Source

pub fn last_element_child(&self) -> Element

Getter of the lastElementChild attribute. Element.lastElementChild

Source

pub fn child_element_count(&self) -> u32

Getter of the childElementCount attribute. Element.childElementCount

Source

pub fn previous_element_sibling(&self) -> Element

Getter of the previousElementSibling attribute. Element.previousElementSibling

Source

pub fn next_element_sibling(&self) -> Element

Getter of the nextElementSibling attribute. Element.nextElementSibling

Source

pub fn assigned_slot(&self) -> HTMLSlotElement

Getter of the assignedSlot attribute. Element.assignedSlot

Source

pub fn role(&self) -> JsString

Getter of the role attribute. Element.role

Source

pub fn set_role(&mut self, value: &JsString)

Setter of the role attribute. Element.role

Source

pub fn aria_active_descendant_element(&self) -> Element

Getter of the ariaActiveDescendantElement attribute. Element.ariaActiveDescendantElement

Source

pub fn set_aria_active_descendant_element(&mut self, value: &Element)

Setter of the ariaActiveDescendantElement attribute. Element.ariaActiveDescendantElement

Source

pub fn aria_atomic(&self) -> JsString

Getter of the ariaAtomic attribute. Element.ariaAtomic

Source

pub fn set_aria_atomic(&mut self, value: &JsString)

Setter of the ariaAtomic attribute. Element.ariaAtomic

Source

pub fn aria_auto_complete(&self) -> JsString

Getter of the ariaAutoComplete attribute. Element.ariaAutoComplete

Source

pub fn set_aria_auto_complete(&mut self, value: &JsString)

Setter of the ariaAutoComplete attribute. Element.ariaAutoComplete

Source

pub fn aria_braille_label(&self) -> JsString

Getter of the ariaBrailleLabel attribute. Element.ariaBrailleLabel

Source

pub fn set_aria_braille_label(&mut self, value: &JsString)

Setter of the ariaBrailleLabel attribute. Element.ariaBrailleLabel

Source

pub fn aria_braille_role_description(&self) -> JsString

Getter of the ariaBrailleRoleDescription attribute. Element.ariaBrailleRoleDescription

Source

pub fn set_aria_braille_role_description(&mut self, value: &JsString)

Setter of the ariaBrailleRoleDescription attribute. Element.ariaBrailleRoleDescription

Source

pub fn aria_busy(&self) -> JsString

Getter of the ariaBusy attribute. Element.ariaBusy

Source

pub fn set_aria_busy(&mut self, value: &JsString)

Setter of the ariaBusy attribute. Element.ariaBusy

Source

pub fn aria_checked(&self) -> JsString

Getter of the ariaChecked attribute. Element.ariaChecked

Source

pub fn set_aria_checked(&mut self, value: &JsString)

Setter of the ariaChecked attribute. Element.ariaChecked

Source

pub fn aria_col_count(&self) -> JsString

Getter of the ariaColCount attribute. Element.ariaColCount

Source

pub fn set_aria_col_count(&mut self, value: &JsString)

Setter of the ariaColCount attribute. Element.ariaColCount

Source

pub fn aria_col_index(&self) -> JsString

Getter of the ariaColIndex attribute. Element.ariaColIndex

Source

pub fn set_aria_col_index(&mut self, value: &JsString)

Setter of the ariaColIndex attribute. Element.ariaColIndex

Source

pub fn aria_col_index_text(&self) -> JsString

Getter of the ariaColIndexText attribute. Element.ariaColIndexText

Source

pub fn set_aria_col_index_text(&mut self, value: &JsString)

Setter of the ariaColIndexText attribute. Element.ariaColIndexText

Source

pub fn aria_col_span(&self) -> JsString

Getter of the ariaColSpan attribute. Element.ariaColSpan

Source

pub fn set_aria_col_span(&mut self, value: &JsString)

Setter of the ariaColSpan attribute. Element.ariaColSpan

Source

pub fn aria_controls_elements(&self) -> TypedArray<Element>

Getter of the ariaControlsElements attribute. Element.ariaControlsElements

Source

pub fn set_aria_controls_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaControlsElements attribute. Element.ariaControlsElements

Source

pub fn aria_current(&self) -> JsString

Getter of the ariaCurrent attribute. Element.ariaCurrent

Source

pub fn set_aria_current(&mut self, value: &JsString)

Setter of the ariaCurrent attribute. Element.ariaCurrent

Source

pub fn aria_described_by_elements(&self) -> TypedArray<Element>

Getter of the ariaDescribedByElements attribute. Element.ariaDescribedByElements

Source

pub fn set_aria_described_by_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaDescribedByElements attribute. Element.ariaDescribedByElements

Source

pub fn aria_description(&self) -> JsString

Getter of the ariaDescription attribute. Element.ariaDescription

Source

pub fn set_aria_description(&mut self, value: &JsString)

Setter of the ariaDescription attribute. Element.ariaDescription

Source

pub fn aria_details_elements(&self) -> TypedArray<Element>

Getter of the ariaDetailsElements attribute. Element.ariaDetailsElements

Source

pub fn set_aria_details_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaDetailsElements attribute. Element.ariaDetailsElements

Source

pub fn aria_disabled(&self) -> JsString

Getter of the ariaDisabled attribute. Element.ariaDisabled

Source

pub fn set_aria_disabled(&mut self, value: &JsString)

Setter of the ariaDisabled attribute. Element.ariaDisabled

Source

pub fn aria_error_message_elements(&self) -> TypedArray<Element>

Getter of the ariaErrorMessageElements attribute. Element.ariaErrorMessageElements

Source

pub fn set_aria_error_message_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaErrorMessageElements attribute. Element.ariaErrorMessageElements

Source

pub fn aria_expanded(&self) -> JsString

Getter of the ariaExpanded attribute. Element.ariaExpanded

Source

pub fn set_aria_expanded(&mut self, value: &JsString)

Setter of the ariaExpanded attribute. Element.ariaExpanded

Source

pub fn aria_flow_to_elements(&self) -> TypedArray<Element>

Getter of the ariaFlowToElements attribute. Element.ariaFlowToElements

Source

pub fn set_aria_flow_to_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaFlowToElements attribute. Element.ariaFlowToElements

Source

pub fn aria_has_popup(&self) -> JsString

Getter of the ariaHasPopup attribute. Element.ariaHasPopup

Source

pub fn set_aria_has_popup(&mut self, value: &JsString)

Setter of the ariaHasPopup attribute. Element.ariaHasPopup

Source

pub fn aria_hidden(&self) -> JsString

Getter of the ariaHidden attribute. Element.ariaHidden

Source

pub fn set_aria_hidden(&mut self, value: &JsString)

Setter of the ariaHidden attribute. Element.ariaHidden

Source

pub fn aria_invalid(&self) -> JsString

Getter of the ariaInvalid attribute. Element.ariaInvalid

Source

pub fn set_aria_invalid(&mut self, value: &JsString)

Setter of the ariaInvalid attribute. Element.ariaInvalid

Source

pub fn aria_key_shortcuts(&self) -> JsString

Getter of the ariaKeyShortcuts attribute. Element.ariaKeyShortcuts

Source

pub fn set_aria_key_shortcuts(&mut self, value: &JsString)

Setter of the ariaKeyShortcuts attribute. Element.ariaKeyShortcuts

Source

pub fn aria_label(&self) -> JsString

Getter of the ariaLabel attribute. Element.ariaLabel

Source

pub fn set_aria_label(&mut self, value: &JsString)

Setter of the ariaLabel attribute. Element.ariaLabel

Source

pub fn aria_labelled_by_elements(&self) -> TypedArray<Element>

Getter of the ariaLabelledByElements attribute. Element.ariaLabelledByElements

Source

pub fn set_aria_labelled_by_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaLabelledByElements attribute. Element.ariaLabelledByElements

Source

pub fn aria_level(&self) -> JsString

Getter of the ariaLevel attribute. Element.ariaLevel

Source

pub fn set_aria_level(&mut self, value: &JsString)

Setter of the ariaLevel attribute. Element.ariaLevel

Source

pub fn aria_live(&self) -> JsString

Getter of the ariaLive attribute. Element.ariaLive

Source

pub fn set_aria_live(&mut self, value: &JsString)

Setter of the ariaLive attribute. Element.ariaLive

Source

pub fn aria_modal(&self) -> JsString

Getter of the ariaModal attribute. Element.ariaModal

Source

pub fn set_aria_modal(&mut self, value: &JsString)

Setter of the ariaModal attribute. Element.ariaModal

Source

pub fn aria_multi_line(&self) -> JsString

Getter of the ariaMultiLine attribute. Element.ariaMultiLine

Source

pub fn set_aria_multi_line(&mut self, value: &JsString)

Setter of the ariaMultiLine attribute. Element.ariaMultiLine

Source

pub fn aria_multi_selectable(&self) -> JsString

Getter of the ariaMultiSelectable attribute. Element.ariaMultiSelectable

Source

pub fn set_aria_multi_selectable(&mut self, value: &JsString)

Setter of the ariaMultiSelectable attribute. Element.ariaMultiSelectable

Source

pub fn aria_orientation(&self) -> JsString

Getter of the ariaOrientation attribute. Element.ariaOrientation

Source

pub fn set_aria_orientation(&mut self, value: &JsString)

Setter of the ariaOrientation attribute. Element.ariaOrientation

Source

pub fn aria_owns_elements(&self) -> TypedArray<Element>

Getter of the ariaOwnsElements attribute. Element.ariaOwnsElements

Source

pub fn set_aria_owns_elements(&mut self, value: &TypedArray<Element>)

Setter of the ariaOwnsElements attribute. Element.ariaOwnsElements

Source

pub fn aria_placeholder(&self) -> JsString

Getter of the ariaPlaceholder attribute. Element.ariaPlaceholder

Source

pub fn set_aria_placeholder(&mut self, value: &JsString)

Setter of the ariaPlaceholder attribute. Element.ariaPlaceholder

Source

pub fn aria_pos_in_set(&self) -> JsString

Getter of the ariaPosInSet attribute. Element.ariaPosInSet

Source

pub fn set_aria_pos_in_set(&mut self, value: &JsString)

Setter of the ariaPosInSet attribute. Element.ariaPosInSet

Source

pub fn aria_pressed(&self) -> JsString

Getter of the ariaPressed attribute. Element.ariaPressed

Source

pub fn set_aria_pressed(&mut self, value: &JsString)

Setter of the ariaPressed attribute. Element.ariaPressed

Source

pub fn aria_read_only(&self) -> JsString

Getter of the ariaReadOnly attribute. Element.ariaReadOnly

Source

pub fn set_aria_read_only(&mut self, value: &JsString)

Setter of the ariaReadOnly attribute. Element.ariaReadOnly

Source

pub fn aria_relevant(&self) -> JsString

Getter of the ariaRelevant attribute. Element.ariaRelevant

Source

pub fn set_aria_relevant(&mut self, value: &JsString)

Setter of the ariaRelevant attribute. Element.ariaRelevant

Source

pub fn aria_required(&self) -> JsString

Getter of the ariaRequired attribute. Element.ariaRequired

Source

pub fn set_aria_required(&mut self, value: &JsString)

Setter of the ariaRequired attribute. Element.ariaRequired

Source

pub fn aria_role_description(&self) -> JsString

Getter of the ariaRoleDescription attribute. Element.ariaRoleDescription

Source

pub fn set_aria_role_description(&mut self, value: &JsString)

Setter of the ariaRoleDescription attribute. Element.ariaRoleDescription

Source

pub fn aria_row_count(&self) -> JsString

Getter of the ariaRowCount attribute. Element.ariaRowCount

Source

pub fn set_aria_row_count(&mut self, value: &JsString)

Setter of the ariaRowCount attribute. Element.ariaRowCount

Source

pub fn aria_row_index(&self) -> JsString

Getter of the ariaRowIndex attribute. Element.ariaRowIndex

Source

pub fn set_aria_row_index(&mut self, value: &JsString)

Setter of the ariaRowIndex attribute. Element.ariaRowIndex

Source

pub fn aria_row_index_text(&self) -> JsString

Getter of the ariaRowIndexText attribute. Element.ariaRowIndexText

Source

pub fn set_aria_row_index_text(&mut self, value: &JsString)

Setter of the ariaRowIndexText attribute. Element.ariaRowIndexText

Source

pub fn aria_row_span(&self) -> JsString

Getter of the ariaRowSpan attribute. Element.ariaRowSpan

Source

pub fn set_aria_row_span(&mut self, value: &JsString)

Setter of the ariaRowSpan attribute. Element.ariaRowSpan

Source

pub fn aria_selected(&self) -> JsString

Getter of the ariaSelected attribute. Element.ariaSelected

Source

pub fn set_aria_selected(&mut self, value: &JsString)

Setter of the ariaSelected attribute. Element.ariaSelected

Source

pub fn aria_set_size(&self) -> JsString

Getter of the ariaSetSize attribute. Element.ariaSetSize

Source

pub fn set_aria_set_size(&mut self, value: &JsString)

Setter of the ariaSetSize attribute. Element.ariaSetSize

Source

pub fn aria_sort(&self) -> JsString

Getter of the ariaSort attribute. Element.ariaSort

Source

pub fn set_aria_sort(&mut self, value: &JsString)

Setter of the ariaSort attribute. Element.ariaSort

Source

pub fn aria_value_max(&self) -> JsString

Getter of the ariaValueMax attribute. Element.ariaValueMax

Source

pub fn set_aria_value_max(&mut self, value: &JsString)

Setter of the ariaValueMax attribute. Element.ariaValueMax

Source

pub fn aria_value_min(&self) -> JsString

Getter of the ariaValueMin attribute. Element.ariaValueMin

Source

pub fn set_aria_value_min(&mut self, value: &JsString)

Setter of the ariaValueMin attribute. Element.ariaValueMin

Source

pub fn aria_value_now(&self) -> JsString

Getter of the ariaValueNow attribute. Element.ariaValueNow

Source

pub fn set_aria_value_now(&mut self, value: &JsString)

Setter of the ariaValueNow attribute. Element.ariaValueNow

Source

pub fn aria_value_text(&self) -> JsString

Getter of the ariaValueText attribute. Element.ariaValueText

Source

pub fn set_aria_value_text(&mut self, value: &JsString)

Setter of the ariaValueText attribute. Element.ariaValueText

Source

pub fn has_attributes(&self) -> bool

The hasAttributes method. Element.hasAttributes

Source

pub fn get_attribute_names(&self) -> TypedArray<JsString>

The getAttributeNames method. Element.getAttributeNames

Source

pub fn get_attribute(&self, qualified_name: &JsString) -> JsString

The getAttribute method. Element.getAttribute

Source

pub fn get_attribute_ns( &self, namespace: &JsString, local_name: &JsString, ) -> JsString

The getAttributeNS method. Element.getAttributeNS

Source

pub fn set_attribute( &self, qualified_name: &JsString, value: &JsString, ) -> Undefined

The setAttribute method. Element.setAttribute

Source

pub fn set_attribute_ns( &self, namespace: &JsString, qualified_name: &JsString, value: &JsString, ) -> Undefined

The setAttributeNS method. Element.setAttributeNS

Source

pub fn remove_attribute(&self, qualified_name: &JsString) -> Undefined

The removeAttribute method. Element.removeAttribute

Source

pub fn remove_attribute_ns( &self, namespace: &JsString, local_name: &JsString, ) -> Undefined

The removeAttributeNS method. Element.removeAttributeNS

Source

pub fn toggle_attribute(&self, qualified_name: &JsString) -> bool

The toggleAttribute method. Element.toggleAttribute

Source

pub fn toggle_attribute_with_force( &self, qualified_name: &JsString, force: bool, ) -> bool

The toggleAttribute method. Element.toggleAttribute

Source

pub fn has_attribute(&self, qualified_name: &JsString) -> bool

The hasAttribute method. Element.hasAttribute

Source

pub fn has_attribute_ns( &self, namespace: &JsString, local_name: &JsString, ) -> bool

The hasAttributeNS method. Element.hasAttributeNS

Source

pub fn get_attribute_node(&self, qualified_name: &JsString) -> Attr

The getAttributeNode method. Element.getAttributeNode

Source

pub fn get_attribute_node_ns( &self, namespace: &JsString, local_name: &JsString, ) -> Attr

The getAttributeNodeNS method. Element.getAttributeNodeNS

Source

pub fn set_attribute_node(&self, attr: &Attr) -> Attr

The setAttributeNode method. Element.setAttributeNode

Source

pub fn set_attribute_node_ns(&self, attr: &Attr) -> Attr

The setAttributeNodeNS method. Element.setAttributeNodeNS

Source

pub fn remove_attribute_node(&self, attr: &Attr) -> Attr

The removeAttributeNode method. Element.removeAttributeNode

Source

pub fn attach_shadow(&self, init: &ShadowRootInit) -> ShadowRoot

The attachShadow method. Element.attachShadow

Source

pub fn closest(&self, selectors: &JsString) -> Element

The closest method. Element.closest

Source

pub fn matches(&self, selectors: &JsString) -> bool

The matches method. Element.matches

Source

pub fn webkit_matches_selector(&self, selectors: &JsString) -> bool

The webkitMatchesSelector method. Element.webkitMatchesSelector

Source

pub fn get_elements_by_tag_name( &self, qualified_name: &JsString, ) -> HTMLCollection

The getElementsByTagName method. Element.getElementsByTagName

Source

pub fn get_elements_by_tag_name_ns( &self, namespace: &JsString, local_name: &JsString, ) -> HTMLCollection

The getElementsByTagNameNS method. Element.getElementsByTagNameNS

Source

pub fn get_elements_by_class_name( &self, class_names: &JsString, ) -> HTMLCollection

The getElementsByClassName method. Element.getElementsByClassName

Source

pub fn insert_adjacent_element( &self, where_: &JsString, element: &Element, ) -> Element

The insertAdjacentElement method. Element.insertAdjacentElement

Source

pub fn insert_adjacent_text( &self, where_: &JsString, data: &JsString, ) -> Undefined

The insertAdjacentText method. Element.insertAdjacentText

Source

pub fn get_spatial_navigation_container(&self) -> Node

The getSpatialNavigationContainer method. Element.getSpatialNavigationContainer

Source

pub fn focusable_areas(&self) -> TypedArray<Node>

The focusableAreas method. Element.focusableAreas

Source

pub fn focusable_areas_with_option( &self, option: &FocusableAreasOption, ) -> TypedArray<Node>

The focusableAreas method. Element.focusableAreas

The spatialNavigationSearch method. Element.spatialNavigationSearch

Source

pub fn spatial_navigation_search_with_options( &self, dir: &SpatialNavigationDirection, options: &SpatialNavigationSearchOptions, ) -> Node

The spatialNavigationSearch method. Element.spatialNavigationSearch

Source

pub fn pseudo(&self, type_: &JsString) -> CSSPseudoElement

The pseudo method. Element.pseudo

Source

pub fn computed_style_map(&self) -> StylePropertyMapReadOnly

The computedStyleMap method. Element.computedStyleMap

Source

pub fn get_client_rects(&self) -> DOMRectList

The getClientRects method. Element.getClientRects

Source

pub fn get_bounding_client_rect(&self) -> DOMRect

The getBoundingClientRect method. Element.getBoundingClientRect

Source

pub fn check_visibility(&self) -> bool

The checkVisibility method. Element.checkVisibility

Source

pub fn check_visibility_with_options( &self, options: &CheckVisibilityOptions, ) -> bool

The checkVisibility method. Element.checkVisibility

Source

pub fn scroll_into_view(&self) -> Undefined

The scrollIntoView method. Element.scrollIntoView

Source

pub fn scroll_into_view_with_arg(&self, arg: &Any) -> Undefined

The scrollIntoView method. Element.scrollIntoView

Source

pub fn scroll(&self) -> Undefined

The scroll method. Element.scroll

Source

pub fn scroll_with_options(&self, options: &ScrollToOptions) -> Undefined

The scroll method. Element.scroll

Source

pub fn scroll_with_x_and_y(&self, x: f64, y: f64) -> Undefined

The scroll method. Element.scroll

Source

pub fn scroll_to(&self) -> Undefined

The scrollTo method. Element.scrollTo

Source

pub fn scroll_to_with_options(&self, options: &ScrollToOptions) -> Undefined

The scrollTo method. Element.scrollTo

Source

pub fn scroll_to_with_x_and_y(&self, x: f64, y: f64) -> Undefined

The scrollTo method. Element.scrollTo

Source

pub fn scroll_by(&self) -> Undefined

The scrollBy method. Element.scrollBy

Source

pub fn scroll_by_with_options(&self, options: &ScrollToOptions) -> Undefined

The scrollBy method. Element.scrollBy

Source

pub fn scroll_by_with_x_and_y(&self, x: f64, y: f64) -> Undefined

The scrollBy method. Element.scrollBy

Source

pub fn request_fullscreen(&self) -> Promise<Undefined>

The requestFullscreen method. Element.requestFullscreen

Source

pub fn request_fullscreen_with_options( &self, options: &FullscreenOptions, ) -> Promise<Undefined>

The requestFullscreen method. Element.requestFullscreen

Source

pub fn set_html_unsafe(&self, html: &Any) -> Undefined

The setHTMLUnsafe method. Element.setHTMLUnsafe

Source

pub fn get_html(&self) -> JsString

The getHTML method. Element.getHTML

Source

pub fn get_html_with_options(&self, options: &GetHTMLOptions) -> JsString

The getHTML method. Element.getHTML

Source

pub fn insert_adjacent_html( &self, position: &JsString, string: &Any, ) -> Undefined

The insertAdjacentHTML method. Element.insertAdjacentHTML

Source

pub fn set_pointer_capture(&self, pointer_id: i32) -> Undefined

The setPointerCapture method. Element.setPointerCapture

Source

pub fn release_pointer_capture(&self, pointer_id: i32) -> Undefined

The releasePointerCapture method. Element.releasePointerCapture

Source

pub fn has_pointer_capture(&self, pointer_id: i32) -> bool

The hasPointerCapture method. Element.hasPointerCapture

Source

pub fn request_pointer_lock(&self) -> Promise<Undefined>

The requestPointerLock method. Element.requestPointerLock

Source

pub fn request_pointer_lock_with_options( &self, options: &PointerLockOptions, ) -> Promise<Undefined>

The requestPointerLock method. Element.requestPointerLock

Source

pub fn get_region_flow_ranges(&self) -> TypedArray<Range>

The getRegionFlowRanges method. Element.getRegionFlowRanges

Source

pub fn get_box_quads(&self) -> TypedArray<DOMQuad>

The getBoxQuads method. Element.getBoxQuads

Source

pub fn get_box_quads_with_options( &self, options: &BoxQuadOptions, ) -> TypedArray<DOMQuad>

The getBoxQuads method. Element.getBoxQuads

Source

pub fn convert_quad_from_node(&self, quad: &DOMQuadInit, from: &Any) -> DOMQuad

The convertQuadFromNode method. Element.convertQuadFromNode

Source

pub fn convert_quad_from_node_with_options( &self, quad: &DOMQuadInit, from: &Any, options: &ConvertCoordinateOptions, ) -> DOMQuad

The convertQuadFromNode method. Element.convertQuadFromNode

Source

pub fn convert_rect_from_node( &self, rect: &DOMRectReadOnly, from: &Any, ) -> DOMQuad

The convertRectFromNode method. Element.convertRectFromNode

Source

pub fn convert_rect_from_node_with_options( &self, rect: &DOMRectReadOnly, from: &Any, options: &ConvertCoordinateOptions, ) -> DOMQuad

The convertRectFromNode method. Element.convertRectFromNode

Source

pub fn convert_point_from_node( &self, point: &DOMPointInit, from: &Any, ) -> DOMPoint

The convertPointFromNode method. Element.convertPointFromNode

Source

pub fn convert_point_from_node_with_options( &self, point: &DOMPointInit, from: &Any, options: &ConvertCoordinateOptions, ) -> DOMPoint

The convertPointFromNode method. Element.convertPointFromNode

Source

pub fn prepend(&self, nodes: &Any) -> Undefined

The prepend method. Element.prepend

Source

pub fn append(&self, nodes: &Any) -> Undefined

The append method. Element.append

Source

pub fn replace_children(&self, nodes: &Any) -> Undefined

The replaceChildren method. Element.replaceChildren

Source

pub fn move_before(&self, node: &Node, child: &Node) -> Undefined

The moveBefore method. Element.moveBefore

Source

pub fn query_selector(&self, selectors: &JsString) -> Element

The querySelector method. Element.querySelector

Source

pub fn query_selector_all(&self, selectors: &JsString) -> NodeList

The querySelectorAll method. Element.querySelectorAll

Source

pub fn before(&self, nodes: &Any) -> Undefined

The before method. Element.before

Source

pub fn after(&self, nodes: &Any) -> Undefined

The after method. Element.after

Source

pub fn replace_with(&self, nodes: &Any) -> Undefined

The replaceWith method. Element.replaceWith

Source

pub fn remove(&self) -> Undefined

The remove method. Element.remove

Source

pub fn animate(&self, keyframes: &Object) -> Animation

The animate method. Element.animate

Source

pub fn animate_with_options( &self, keyframes: &Object, options: &Any, ) -> Animation

The animate method. Element.animate

Source

pub fn get_animations(&self) -> TypedArray<Animation>

The getAnimations method. Element.getAnimations

Source

pub fn get_animations_with_options( &self, options: &GetAnimationsOptions, ) -> TypedArray<Animation>

The getAnimations method. Element.getAnimations

Methods from Deref<Target = Node>§

Source

pub fn node_type(&self) -> u16

Getter of the nodeType attribute. Node.nodeType

Source

pub fn node_name(&self) -> JsString

Getter of the nodeName attribute. Node.nodeName

Source

pub fn base_uri(&self) -> JsString

Getter of the baseURI attribute. Node.baseURI

Source

pub fn is_connected(&self) -> bool

Getter of the isConnected attribute. Node.isConnected

Source

pub fn owner_document(&self) -> Document

Getter of the ownerDocument attribute. Node.ownerDocument

Source

pub fn parent_node(&self) -> Node

Getter of the parentNode attribute. Node.parentNode

Source

pub fn parent_element(&self) -> Element

Getter of the parentElement attribute. Node.parentElement

Source

pub fn child_nodes(&self) -> NodeList

Getter of the childNodes attribute. Node.childNodes

Source

pub fn first_child(&self) -> Node

Getter of the firstChild attribute. Node.firstChild

Source

pub fn last_child(&self) -> Node

Getter of the lastChild attribute. Node.lastChild

Source

pub fn previous_sibling(&self) -> Node

Getter of the previousSibling attribute. Node.previousSibling

Source

pub fn next_sibling(&self) -> Node

Getter of the nextSibling attribute. Node.nextSibling

Source

pub fn node_value(&self) -> JsString

Getter of the nodeValue attribute. Node.nodeValue

Source

pub fn set_node_value(&mut self, value: &JsString)

Setter of the nodeValue attribute. Node.nodeValue

Source

pub fn text_content(&self) -> JsString

Getter of the textContent attribute. Node.textContent

Source

pub fn set_text_content(&mut self, value: &JsString)

Setter of the textContent attribute. Node.textContent

Examples found in repository?
examples/button.rs (line 23)
4fn main() {
5    let con = Console::get();
6    let document = window().document();
7    let bodies = document.get_elements_by_tag_name(&"body".into());
8    if bodies.length() == 0 {
9        con.log(&["I Ain't got Nobody!".into()]);
10        return;
11    }
12    let body = bodies.item(0);
13    let mut button = document
14        .create_element(&"BUTTON".into())
15        .dyn_into::<HTMLButtonElement>()
16        .unwrap();
17
18    let style = button.style();
19    style.set_property(&"color".into(), &"red".into());
20    style.set_property(&"background-color".into(), &"#aaf".into());
21    style.set_property(&"border".into(), &"solid".into());
22
23    button.set_text_content(&"Click me".into());
24    button.add_event_listener(
25        &"click".into(),
26        &EventListener::from_closure(move |e: Event| {
27            let p = e.dyn_into::<PointerEvent>().unwrap();
28            con.log(&[p.client_x().into()]);
29            Undefined::VALUE
30        }),
31    );
32    body.append_child(button.dyn_ref::<Node>().unwrap());
33}
More examples
Hide additional examples
examples/audio.rs (line 21)
4fn main() {
5    let context = AudioContext::new();
6    println!("Got an AudioContext");
7
8    // Create oscillator
9    let mut oscillator = context.create_oscillator();
10    println!("Configuring oscillator");
11    oscillator.set_type_(&OscillatorType::TRIANGLE);
12    oscillator.frequency().set_value(261.63); // Middle C
13
14    let document = window().document();
15    let body = document.get_elements_by_tag_name(&"body".into()).item(0);
16    let mut button = document
17        .create_element(&"BUTTON".into())
18        .dyn_into::<HTMLButtonElement>()
19        .unwrap();
20
21    button.set_text_content(&"Click me".into());
22    button.add_event_listener(
23        &JsString::from("click"),
24        &EventListener::from_closure(move |_e: Event| {
25            println!("Playing");
26            oscillator.connect_with_destination_param(
27                context.destination().unchecked_ref::<AudioParam>(),
28            );
29            oscillator.start_with_when(0.0);
30            println!("All done!");
31            Undefined::VALUE
32        }),
33    );
34    body.append_child(button.dyn_ref::<Node>().unwrap());
35}
Source

pub fn get_root_node(&self) -> Node

The getRootNode method. Node.getRootNode

Source

pub fn get_root_node_with_options(&self, options: &GetRootNodeOptions) -> Node

The getRootNode method. Node.getRootNode

Source

pub fn has_child_nodes(&self) -> bool

The hasChildNodes method. Node.hasChildNodes

Source

pub fn normalize(&self) -> Undefined

The normalize method. Node.normalize

Source

pub fn clone_node(&self) -> Node

The cloneNode method. Node.cloneNode

Source

pub fn clone_node_with_subtree(&self, subtree: bool) -> Node

The cloneNode method. Node.cloneNode

Source

pub fn is_equal_node(&self, other_node: &Node) -> bool

The isEqualNode method. Node.isEqualNode

Source

pub fn is_same_node(&self, other_node: &Node) -> bool

The isSameNode method. Node.isSameNode

Source

pub fn compare_document_position(&self, other: &Node) -> u16

The compareDocumentPosition method. Node.compareDocumentPosition

Source

pub fn contains(&self, other: &Node) -> bool

The contains method. Node.contains

Source

pub fn lookup_prefix(&self, namespace: &JsString) -> JsString

The lookupPrefix method. Node.lookupPrefix

Source

pub fn lookup_namespace_uri(&self, prefix: &JsString) -> JsString

The lookupNamespaceURI method. Node.lookupNamespaceURI

Source

pub fn is_default_namespace(&self, namespace: &JsString) -> bool

The isDefaultNamespace method. Node.isDefaultNamespace

Source

pub fn insert_before(&self, node: &Node, child: &Node) -> Node

The insertBefore method. Node.insertBefore

Source

pub fn append_child(&self, node: &Node) -> Node

The appendChild method. Node.appendChild

Examples found in repository?
examples/button.rs (line 32)
4fn main() {
5    let con = Console::get();
6    let document = window().document();
7    let bodies = document.get_elements_by_tag_name(&"body".into());
8    if bodies.length() == 0 {
9        con.log(&["I Ain't got Nobody!".into()]);
10        return;
11    }
12    let body = bodies.item(0);
13    let mut button = document
14        .create_element(&"BUTTON".into())
15        .dyn_into::<HTMLButtonElement>()
16        .unwrap();
17
18    let style = button.style();
19    style.set_property(&"color".into(), &"red".into());
20    style.set_property(&"background-color".into(), &"#aaf".into());
21    style.set_property(&"border".into(), &"solid".into());
22
23    button.set_text_content(&"Click me".into());
24    button.add_event_listener(
25        &"click".into(),
26        &EventListener::from_closure(move |e: Event| {
27            let p = e.dyn_into::<PointerEvent>().unwrap();
28            con.log(&[p.client_x().into()]);
29            Undefined::VALUE
30        }),
31    );
32    body.append_child(button.dyn_ref::<Node>().unwrap());
33}
More examples
Hide additional examples
examples/audio.rs (line 34)
4fn main() {
5    let context = AudioContext::new();
6    println!("Got an AudioContext");
7
8    // Create oscillator
9    let mut oscillator = context.create_oscillator();
10    println!("Configuring oscillator");
11    oscillator.set_type_(&OscillatorType::TRIANGLE);
12    oscillator.frequency().set_value(261.63); // Middle C
13
14    let document = window().document();
15    let body = document.get_elements_by_tag_name(&"body".into()).item(0);
16    let mut button = document
17        .create_element(&"BUTTON".into())
18        .dyn_into::<HTMLButtonElement>()
19        .unwrap();
20
21    button.set_text_content(&"Click me".into());
22    button.add_event_listener(
23        &JsString::from("click"),
24        &EventListener::from_closure(move |_e: Event| {
25            println!("Playing");
26            oscillator.connect_with_destination_param(
27                context.destination().unchecked_ref::<AudioParam>(),
28            );
29            oscillator.start_with_when(0.0);
30            println!("All done!");
31            Undefined::VALUE
32        }),
33    );
34    body.append_child(button.dyn_ref::<Node>().unwrap());
35}
Source

pub fn replace_child(&self, node: &Node, child: &Node) -> Node

The replaceChild method. Node.replaceChild

Source

pub fn remove_child(&self, child: &Node) -> Node

The removeChild method. Node.removeChild

Methods from Deref<Target = EventTarget>§

Source

pub fn add_event_listener( &self, type_: &JsString, callback: &EventListener, ) -> Undefined

The addEventListener method. EventTarget.addEventListener

Examples found in repository?
examples/button.rs (lines 24-31)
4fn main() {
5    let con = Console::get();
6    let document = window().document();
7    let bodies = document.get_elements_by_tag_name(&"body".into());
8    if bodies.length() == 0 {
9        con.log(&["I Ain't got Nobody!".into()]);
10        return;
11    }
12    let body = bodies.item(0);
13    let mut button = document
14        .create_element(&"BUTTON".into())
15        .dyn_into::<HTMLButtonElement>()
16        .unwrap();
17
18    let style = button.style();
19    style.set_property(&"color".into(), &"red".into());
20    style.set_property(&"background-color".into(), &"#aaf".into());
21    style.set_property(&"border".into(), &"solid".into());
22
23    button.set_text_content(&"Click me".into());
24    button.add_event_listener(
25        &"click".into(),
26        &EventListener::from_closure(move |e: Event| {
27            let p = e.dyn_into::<PointerEvent>().unwrap();
28            con.log(&[p.client_x().into()]);
29            Undefined::VALUE
30        }),
31    );
32    body.append_child(button.dyn_ref::<Node>().unwrap());
33}
More examples
Hide additional examples
examples/audio.rs (lines 22-33)
4fn main() {
5    let context = AudioContext::new();
6    println!("Got an AudioContext");
7
8    // Create oscillator
9    let mut oscillator = context.create_oscillator();
10    println!("Configuring oscillator");
11    oscillator.set_type_(&OscillatorType::TRIANGLE);
12    oscillator.frequency().set_value(261.63); // Middle C
13
14    let document = window().document();
15    let body = document.get_elements_by_tag_name(&"body".into()).item(0);
16    let mut button = document
17        .create_element(&"BUTTON".into())
18        .dyn_into::<HTMLButtonElement>()
19        .unwrap();
20
21    button.set_text_content(&"Click me".into());
22    button.add_event_listener(
23        &JsString::from("click"),
24        &EventListener::from_closure(move |_e: Event| {
25            println!("Playing");
26            oscillator.connect_with_destination_param(
27                context.destination().unchecked_ref::<AudioParam>(),
28            );
29            oscillator.start_with_when(0.0);
30            println!("All done!");
31            Undefined::VALUE
32        }),
33    );
34    body.append_child(button.dyn_ref::<Node>().unwrap());
35}
Source

pub fn add_event_listener_with_options( &self, type_: &JsString, callback: &EventListener, options: &Any, ) -> Undefined

The addEventListener method. EventTarget.addEventListener

Source

pub fn remove_event_listener( &self, type_: &JsString, callback: &EventListener, ) -> Undefined

The removeEventListener method. EventTarget.removeEventListener

Source

pub fn remove_event_listener_with_options( &self, type_: &JsString, callback: &EventListener, options: &Any, ) -> Undefined

The removeEventListener method. EventTarget.removeEventListener

Source

pub fn dispatch_event(&self, event: &Event) -> bool

The dispatchEvent method. EventTarget.dispatchEvent

Source

pub fn when(&self, type_: &JsString) -> Observable

The when method. EventTarget.when

Source

pub fn when_with_options( &self, type_: &JsString, options: &ObservableEventListenerOptions, ) -> Observable

The when method. EventTarget.when

Methods from Deref<Target = Any>§

Source

pub fn get<T>(&self, prop: T) -> Val
where T: Into<Val>,

Gets the property prop

Source

pub fn set<K, V>(&self, prop: K, val: V)
where K: Into<Val>, V: Into<Val>,

Set the underlying js object property prop to val

Source

pub fn has<T>(&self, prop: T) -> bool
where T: Into<Val>,

Checks whether a property prop exists

Source

pub fn has_own_property(&self, prop: &str) -> bool

Checks whether a non-inherited property prop exists

Source

pub fn type_of(&self) -> String

Gets the typeof the underlying js object

Source

pub fn at<T>(&self, idx: T) -> Val
where T: Into<Val>,

Gets the element at index idx. Assumes the underlying js type is indexable

Source

pub fn to_vec<V>(&self) -> Vec<V>
where V: FromVal,

Converts the underlying js array to a Vec of V

Source

pub fn call(&self, f: &str, args: &[Val]) -> Val

Calls the method f with args, can return an undefined js value

Source

pub fn new(&self, args: &[Val]) -> Val

Calls the object’s constructor with args constructing a new object

Source

pub fn invoke(&self, args: &[Val]) -> Val

Invokes the function object with args, can return an undefined js value

Source

pub fn await_(&self) -> Val

Awaits the invoked function object

Source

pub fn instanceof(&self, v: Val) -> bool

Checks whether this Val is an instanceof v

Source

pub fn is_number(&self) -> bool

Source

pub fn is_bool(&self) -> bool

Source

pub fn is_string(&self) -> bool

Source

pub fn is_null(&self) -> bool

Source

pub fn is_undefined(&self) -> bool

Source

pub fn is_error(&self) -> bool

Source

pub fn is_function(&self) -> bool

Source

pub fn as_<T>(&self) -> T
where T: FromVal,

Source

pub fn to_utf16(&self) -> Option<Vec<u16>>

Extracts UTF-16 data as Option<Vec>

Source

pub fn to_utf16_result(&self) -> Result<Vec<u16>, Val>

Extracts UTF-16 data, returning error if null or if self is error

Trait Implementations§

Source§

impl AsMut<Val> for HTMLFrameSetElement

Source§

fn as_mut(&mut self) -> &mut Any

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Val> for HTMLFrameSetElement

Source§

fn as_ref(&self) -> &Any

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for HTMLFrameSetElement

Source§

fn clone(&self) -> HTMLFrameSetElement

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HTMLFrameSetElement

Source§

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

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

impl Deref for HTMLFrameSetElement

Source§

type Target = HTMLElement

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for HTMLFrameSetElement

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl DynCast for HTMLFrameSetElement

Source§

fn instanceof(val: &Any) -> bool

Implementation of val instanceof ThisType.
Source§

fn unchecked_from_val(v: Any) -> Self

Zero-cost unchecked conversion from Val into Self.
Source§

fn unchecked_from_val_ref(v: &Any) -> &Self

Zero-cost unchecked conversion from &Val into &Self.
Source§

fn unchecked_from_val_mut(v: &mut Any) -> &mut Self

Zero-cost unchecked conversion from &mut Val into &mut Self.
Source§

fn has_type<T>(&self) -> bool
where T: DynCast,

Source§

fn dyn_into<T>(self) -> Result<T, Self>
where T: DynCast,

Source§

fn dyn_ref<T>(&self) -> Option<&T>
where T: DynCast,

Source§

fn dyn_mut<T>(&mut self) -> Option<&mut T>
where T: DynCast,

Source§

fn unchecked_into<T>(self) -> T
where T: DynCast,

Source§

fn unchecked_ref<T>(&self) -> &T
where T: DynCast,

Source§

fn unchecked_mut<T>(&mut self) -> &mut T
where T: DynCast,

Source§

fn is_instance_of<T>(&self) -> bool
where T: DynCast,

Source§

fn is_type_of(val: &Val) -> bool

Customisable brand check – defaults to instanceof.
Source§

impl From<&HTMLFrameSetElement> for Any

Source§

fn from(s: &HTMLFrameSetElement) -> Any

Converts to this type from the input type.
Source§

impl From<HTMLFrameSetElement> for Any

Source§

fn from(s: HTMLFrameSetElement) -> Any

Converts to this type from the input type.
Source§

impl FromVal for HTMLFrameSetElement

Source§

fn from_val(v: &Any) -> Self

Creates a Val object from another
Source§

fn take_ownership(v: AnyHandle) -> Self

Takes the ownership of a handle
Source§

fn as_handle(&self) -> AnyHandle

Returns the raw js handle
Source§

impl PartialEq for HTMLFrameSetElement

Source§

fn eq(&self, other: &HTMLFrameSetElement) -> 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 PartialOrd for HTMLFrameSetElement

Source§

fn partial_cmp(&self, other: &HTMLFrameSetElement) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for HTMLFrameSetElement

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.