pub trait ElementMethods {
Show 164 methods
// Required methods
fn GetNamespaceURI(&self) -> Option<DOMString>;
fn GetPrefix(&self) -> Option<DOMString>;
fn LocalName(&self) -> DOMString;
fn TagName(&self) -> DOMString;
fn Id(&self) -> DOMString;
fn SetId(&self, value: DOMString);
fn ClassName(&self) -> DOMString;
fn SetClassName(&self, value: DOMString);
fn ClassList(&self) -> Root<Dom<DOMTokenList>>;
fn HasAttributes(&self) -> bool;
fn Attributes(&self) -> Root<Dom<NamedNodeMap>>;
fn GetAttributeNames(&self) -> Vec<DOMString>;
fn GetAttribute(&self, name: DOMString) -> Option<DOMString>;
fn GetAttributeNS(
&self,
namespace: Option<DOMString>,
localName: DOMString,
) -> Option<DOMString>;
fn ToggleAttribute(
&self,
name: DOMString,
force: Option<bool>,
) -> Result<bool, Error>;
fn SetAttribute(
&self,
name: DOMString,
value: DOMString,
) -> Result<(), Error>;
fn SetAttributeNS(
&self,
namespace: Option<DOMString>,
name: DOMString,
value: DOMString,
) -> Result<(), Error>;
fn RemoveAttribute(&self, name: DOMString);
fn RemoveAttributeNS(
&self,
namespace: Option<DOMString>,
localName: DOMString,
);
fn HasAttribute(&self, name: DOMString) -> bool;
fn HasAttributeNS(
&self,
namespace: Option<DOMString>,
localName: DOMString,
) -> bool;
fn GetAttributeNode(&self, name: DOMString) -> Option<Root<Dom<Attr>>>;
fn GetAttributeNodeNS(
&self,
namespace: Option<DOMString>,
localName: DOMString,
) -> Option<Root<Dom<Attr>>>;
fn SetAttributeNode(
&self,
attr: &Attr,
) -> Result<Option<Root<Dom<Attr>>>, Error>;
fn SetAttributeNodeNS(
&self,
attr: &Attr,
) -> Result<Option<Root<Dom<Attr>>>, Error>;
fn RemoveAttributeNode(
&self,
oldAttr: &Attr,
) -> Result<Root<Dom<Attr>>, Error>;
fn Closest(
&self,
selectors: DOMString,
) -> Result<Option<Root<Dom<Element>>>, Error>;
fn Matches(&self, selectors: DOMString) -> Result<bool, Error>;
fn WebkitMatchesSelector(&self, selectors: DOMString) -> Result<bool, Error>;
fn GetElementsByTagName(
&self,
localName: DOMString,
) -> Root<Dom<HTMLCollection>>;
fn GetElementsByTagNameNS(
&self,
namespace: Option<DOMString>,
localName: DOMString,
) -> Root<Dom<HTMLCollection>>;
fn GetElementsByClassName(
&self,
classNames: DOMString,
) -> Root<Dom<HTMLCollection>>;
fn InsertAdjacentElement(
&self,
where_: DOMString,
element: &Element,
) -> Result<Option<Root<Dom<Element>>>, Error>;
fn InsertAdjacentText(
&self,
where_: DOMString,
data: DOMString,
) -> Result<(), Error>;
fn InsertAdjacentHTML(
&self,
position: DOMString,
html: DOMString,
) -> Result<(), Error>;
fn AttachShadow(&self) -> Result<Root<Dom<ShadowRoot>>, Error>;
fn GetClientRects(&self) -> Vec<Root<Dom<DOMRect>>>;
fn GetBoundingClientRect(&self) -> Root<Dom<DOMRect>>;
fn Scroll(&self, options: &ScrollToOptions);
fn Scroll_(&self, x: f64, y: f64);
fn ScrollTo(&self, options: &ScrollToOptions);
fn ScrollTo_(&self, x: f64, y: f64);
fn ScrollBy(&self, options: &ScrollToOptions);
fn ScrollBy_(&self, x: f64, y: f64);
fn ScrollTop(&self) -> f64;
fn SetScrollTop(&self, value: f64);
fn ScrollLeft(&self) -> f64;
fn SetScrollLeft(&self, value: f64);
fn ScrollWidth(&self) -> i32;
fn ScrollHeight(&self) -> i32;
fn ClientTop(&self) -> i32;
fn ClientLeft(&self) -> i32;
fn ClientWidth(&self) -> i32;
fn ClientHeight(&self) -> i32;
fn GetInnerHTML(&self) -> Result<DOMString, Error>;
fn SetInnerHTML(&self, value: DOMString) -> Result<(), Error>;
fn GetOuterHTML(&self) -> Result<DOMString, Error>;
fn SetOuterHTML(&self, value: DOMString) -> Result<(), Error>;
fn RequestFullscreen(&self) -> Rc<Promise>;
fn GetRole(&self) -> Option<DOMString>;
fn SetRole(&self, value: Option<DOMString>);
fn GetAriaAtomic(&self) -> Option<DOMString>;
fn SetAriaAtomic(&self, value: Option<DOMString>);
fn GetAriaAutoComplete(&self) -> Option<DOMString>;
fn SetAriaAutoComplete(&self, value: Option<DOMString>);
fn GetAriaBrailleLabel(&self) -> Option<DOMString>;
fn SetAriaBrailleLabel(&self, value: Option<DOMString>);
fn GetAriaBrailleRoleDescription(&self) -> Option<DOMString>;
fn SetAriaBrailleRoleDescription(&self, value: Option<DOMString>);
fn GetAriaBusy(&self) -> Option<DOMString>;
fn SetAriaBusy(&self, value: Option<DOMString>);
fn GetAriaChecked(&self) -> Option<DOMString>;
fn SetAriaChecked(&self, value: Option<DOMString>);
fn GetAriaColCount(&self) -> Option<DOMString>;
fn SetAriaColCount(&self, value: Option<DOMString>);
fn GetAriaColIndex(&self) -> Option<DOMString>;
fn SetAriaColIndex(&self, value: Option<DOMString>);
fn GetAriaColIndexText(&self) -> Option<DOMString>;
fn SetAriaColIndexText(&self, value: Option<DOMString>);
fn GetAriaColSpan(&self) -> Option<DOMString>;
fn SetAriaColSpan(&self, value: Option<DOMString>);
fn GetAriaCurrent(&self) -> Option<DOMString>;
fn SetAriaCurrent(&self, value: Option<DOMString>);
fn GetAriaDescription(&self) -> Option<DOMString>;
fn SetAriaDescription(&self, value: Option<DOMString>);
fn GetAriaDisabled(&self) -> Option<DOMString>;
fn SetAriaDisabled(&self, value: Option<DOMString>);
fn GetAriaExpanded(&self) -> Option<DOMString>;
fn SetAriaExpanded(&self, value: Option<DOMString>);
fn GetAriaHasPopup(&self) -> Option<DOMString>;
fn SetAriaHasPopup(&self, value: Option<DOMString>);
fn GetAriaHidden(&self) -> Option<DOMString>;
fn SetAriaHidden(&self, value: Option<DOMString>);
fn GetAriaInvalid(&self) -> Option<DOMString>;
fn SetAriaInvalid(&self, value: Option<DOMString>);
fn GetAriaKeyShortcuts(&self) -> Option<DOMString>;
fn SetAriaKeyShortcuts(&self, value: Option<DOMString>);
fn GetAriaLabel(&self) -> Option<DOMString>;
fn SetAriaLabel(&self, value: Option<DOMString>);
fn GetAriaLevel(&self) -> Option<DOMString>;
fn SetAriaLevel(&self, value: Option<DOMString>);
fn GetAriaLive(&self) -> Option<DOMString>;
fn SetAriaLive(&self, value: Option<DOMString>);
fn GetAriaModal(&self) -> Option<DOMString>;
fn SetAriaModal(&self, value: Option<DOMString>);
fn GetAriaMultiLine(&self) -> Option<DOMString>;
fn SetAriaMultiLine(&self, value: Option<DOMString>);
fn GetAriaMultiSelectable(&self) -> Option<DOMString>;
fn SetAriaMultiSelectable(&self, value: Option<DOMString>);
fn GetAriaOrientation(&self) -> Option<DOMString>;
fn SetAriaOrientation(&self, value: Option<DOMString>);
fn GetAriaPlaceholder(&self) -> Option<DOMString>;
fn SetAriaPlaceholder(&self, value: Option<DOMString>);
fn GetAriaPosInSet(&self) -> Option<DOMString>;
fn SetAriaPosInSet(&self, value: Option<DOMString>);
fn GetAriaPressed(&self) -> Option<DOMString>;
fn SetAriaPressed(&self, value: Option<DOMString>);
fn GetAriaReadOnly(&self) -> Option<DOMString>;
fn SetAriaReadOnly(&self, value: Option<DOMString>);
fn GetAriaRelevant(&self) -> Option<DOMString>;
fn SetAriaRelevant(&self, value: Option<DOMString>);
fn GetAriaRequired(&self) -> Option<DOMString>;
fn SetAriaRequired(&self, value: Option<DOMString>);
fn GetAriaRoleDescription(&self) -> Option<DOMString>;
fn SetAriaRoleDescription(&self, value: Option<DOMString>);
fn GetAriaRowCount(&self) -> Option<DOMString>;
fn SetAriaRowCount(&self, value: Option<DOMString>);
fn GetAriaRowIndex(&self) -> Option<DOMString>;
fn SetAriaRowIndex(&self, value: Option<DOMString>);
fn GetAriaRowIndexText(&self) -> Option<DOMString>;
fn SetAriaRowIndexText(&self, value: Option<DOMString>);
fn GetAriaRowSpan(&self) -> Option<DOMString>;
fn SetAriaRowSpan(&self, value: Option<DOMString>);
fn GetAriaSelected(&self) -> Option<DOMString>;
fn SetAriaSelected(&self, value: Option<DOMString>);
fn GetAriaSetSize(&self) -> Option<DOMString>;
fn SetAriaSetSize(&self, value: Option<DOMString>);
fn GetAriaSort(&self) -> Option<DOMString>;
fn SetAriaSort(&self, value: Option<DOMString>);
fn GetAriaValueMax(&self) -> Option<DOMString>;
fn SetAriaValueMax(&self, value: Option<DOMString>);
fn GetAriaValueMin(&self) -> Option<DOMString>;
fn SetAriaValueMin(&self, value: Option<DOMString>);
fn GetAriaValueNow(&self) -> Option<DOMString>;
fn SetAriaValueNow(&self, value: Option<DOMString>);
fn GetAriaValueText(&self) -> Option<DOMString>;
fn SetAriaValueText(&self, value: Option<DOMString>);
fn EnterFormalActivationState(&self) -> Result<(), Error>;
fn ExitFormalActivationState(&self) -> Result<(), Error>;
fn Before(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn After(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn ReplaceWith(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn Remove(&self);
fn GetPreviousElementSibling(&self) -> Option<Root<Dom<Element>>>;
fn GetNextElementSibling(&self) -> Option<Root<Dom<Element>>>;
fn Children(&self) -> Root<Dom<HTMLCollection>>;
fn GetFirstElementChild(&self) -> Option<Root<Dom<Element>>>;
fn GetLastElementChild(&self) -> Option<Root<Dom<Element>>>;
fn ChildElementCount(&self) -> u32;
fn Prepend(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn Append(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn ReplaceChildren(&self, nodes: Vec<NodeOrString>) -> Result<(), Error>;
fn QuerySelector(
&self,
selectors: DOMString,
) -> Result<Option<Root<Dom<Element>>>, Error>;
fn QuerySelectorAll(
&self,
selectors: DOMString,
) -> Result<Root<Dom<NodeList>>, Error>;
}