pub trait ElementMethods<D: DomTypes> {
Show 165 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, _can_gc: CanGc);
fn ClassName(&self) -> DOMString;
fn SetClassName(&self, value: DOMString, _can_gc: CanGc);
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>,
_can_gc: CanGc,
) -> Result<bool, Error>;
fn SetAttribute(
&self,
name: DOMString,
value: DOMString,
_can_gc: CanGc,
) -> Result<(), Error>;
fn SetAttributeNS(
&self,
namespace: Option<DOMString>,
name: DOMString,
value: DOMString,
_can_gc: CanGc,
) -> 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,
_can_gc: CanGc,
) -> Result<(), Error>;
fn InsertAdjacentHTML(
&self,
position: DOMString,
html: DOMString,
_can_gc: CanGc,
) -> Result<(), Error>;
fn AttachShadow(
&self,
init: &ShadowRootInit,
) -> Result<Root<Dom<ShadowRoot>>, Error>;
fn GetShadowRoot(&self) -> Option<Root<Dom<ShadowRoot>>>;
fn GetClientRects(&self, _can_gc: CanGc) -> Root<Dom<DOMRectList>>;
fn GetBoundingClientRect(&self, _can_gc: CanGc) -> Root<Dom<DOMRect>>;
fn Scroll(&self, options: &ScrollToOptions, _can_gc: CanGc);
fn Scroll_(&self, x: f64, y: f64, _can_gc: CanGc);
fn ScrollTo(&self, options: &ScrollToOptions);
fn ScrollTo_(&self, x: f64, y: f64);
fn ScrollBy(&self, options: &ScrollToOptions, _can_gc: CanGc);
fn ScrollBy_(&self, x: f64, y: f64, _can_gc: CanGc);
fn ScrollTop(&self, _can_gc: CanGc) -> f64;
fn SetScrollTop(&self, value: f64, _can_gc: CanGc);
fn ScrollLeft(&self, _can_gc: CanGc) -> f64;
fn SetScrollLeft(&self, value: f64, _can_gc: CanGc);
fn ScrollWidth(&self, _can_gc: CanGc) -> i32;
fn ScrollHeight(&self, _can_gc: CanGc) -> i32;
fn ClientTop(&self, _can_gc: CanGc) -> i32;
fn ClientLeft(&self, _can_gc: CanGc) -> i32;
fn ClientWidth(&self, _can_gc: CanGc) -> i32;
fn ClientHeight(&self, _can_gc: CanGc) -> i32;
fn GetInnerHTML(&self) -> Result<DOMString, Error>;
fn SetInnerHTML(
&self,
value: DOMString,
_can_gc: CanGc,
) -> Result<(), Error>;
fn GetOuterHTML(&self) -> Result<DOMString, Error>;
fn SetOuterHTML(
&self,
value: DOMString,
_can_gc: CanGc,
) -> Result<(), Error>;
fn RequestFullscreen(&self, _can_gc: CanGc) -> Rc<Promise>;
fn GetRole(&self) -> Option<DOMString>;
fn SetRole(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaAtomic(&self) -> Option<DOMString>;
fn SetAriaAtomic(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaAutoComplete(&self) -> Option<DOMString>;
fn SetAriaAutoComplete(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaBrailleLabel(&self) -> Option<DOMString>;
fn SetAriaBrailleLabel(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaBrailleRoleDescription(&self) -> Option<DOMString>;
fn SetAriaBrailleRoleDescription(
&self,
value: Option<DOMString>,
_can_gc: CanGc,
);
fn GetAriaBusy(&self) -> Option<DOMString>;
fn SetAriaBusy(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaChecked(&self) -> Option<DOMString>;
fn SetAriaChecked(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaColCount(&self) -> Option<DOMString>;
fn SetAriaColCount(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaColIndex(&self) -> Option<DOMString>;
fn SetAriaColIndex(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaColIndexText(&self) -> Option<DOMString>;
fn SetAriaColIndexText(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaColSpan(&self) -> Option<DOMString>;
fn SetAriaColSpan(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaCurrent(&self) -> Option<DOMString>;
fn SetAriaCurrent(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaDescription(&self) -> Option<DOMString>;
fn SetAriaDescription(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaDisabled(&self) -> Option<DOMString>;
fn SetAriaDisabled(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaExpanded(&self) -> Option<DOMString>;
fn SetAriaExpanded(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaHasPopup(&self) -> Option<DOMString>;
fn SetAriaHasPopup(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaHidden(&self) -> Option<DOMString>;
fn SetAriaHidden(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaInvalid(&self) -> Option<DOMString>;
fn SetAriaInvalid(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaKeyShortcuts(&self) -> Option<DOMString>;
fn SetAriaKeyShortcuts(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaLabel(&self) -> Option<DOMString>;
fn SetAriaLabel(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaLevel(&self) -> Option<DOMString>;
fn SetAriaLevel(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaLive(&self) -> Option<DOMString>;
fn SetAriaLive(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaModal(&self) -> Option<DOMString>;
fn SetAriaModal(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaMultiLine(&self) -> Option<DOMString>;
fn SetAriaMultiLine(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaMultiSelectable(&self) -> Option<DOMString>;
fn SetAriaMultiSelectable(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaOrientation(&self) -> Option<DOMString>;
fn SetAriaOrientation(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaPlaceholder(&self) -> Option<DOMString>;
fn SetAriaPlaceholder(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaPosInSet(&self) -> Option<DOMString>;
fn SetAriaPosInSet(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaPressed(&self) -> Option<DOMString>;
fn SetAriaPressed(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaReadOnly(&self) -> Option<DOMString>;
fn SetAriaReadOnly(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRelevant(&self) -> Option<DOMString>;
fn SetAriaRelevant(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRequired(&self) -> Option<DOMString>;
fn SetAriaRequired(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRoleDescription(&self) -> Option<DOMString>;
fn SetAriaRoleDescription(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRowCount(&self) -> Option<DOMString>;
fn SetAriaRowCount(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRowIndex(&self) -> Option<DOMString>;
fn SetAriaRowIndex(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRowIndexText(&self) -> Option<DOMString>;
fn SetAriaRowIndexText(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaRowSpan(&self) -> Option<DOMString>;
fn SetAriaRowSpan(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaSelected(&self) -> Option<DOMString>;
fn SetAriaSelected(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaSetSize(&self) -> Option<DOMString>;
fn SetAriaSetSize(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaSort(&self) -> Option<DOMString>;
fn SetAriaSort(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaValueMax(&self) -> Option<DOMString>;
fn SetAriaValueMax(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaValueMin(&self) -> Option<DOMString>;
fn SetAriaValueMin(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaValueNow(&self) -> Option<DOMString>;
fn SetAriaValueNow(&self, value: Option<DOMString>, _can_gc: CanGc);
fn GetAriaValueText(&self) -> Option<DOMString>;
fn SetAriaValueText(&self, value: Option<DOMString>, _can_gc: CanGc);
fn EnterFormalActivationState(&self) -> Result<(), Error>;
fn ExitFormalActivationState(&self) -> Result<(), Error>;
fn Before(
&self,
nodes: Vec<NodeOrString>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn After(
&self,
nodes: Vec<NodeOrString>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn ReplaceWith(
&self,
nodes: Vec<NodeOrString>,
_can_gc: CanGc,
) -> 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>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn Append(
&self,
nodes: Vec<NodeOrString>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn ReplaceChildren(
&self,
nodes: Vec<NodeOrString>,
_can_gc: CanGc,
) -> Result<(), Error>;
fn QuerySelector(
&self,
selectors: DOMString,
) -> Result<Option<Root<Dom<Element>>>, Error>;
fn QuerySelectorAll(
&self,
selectors: DOMString,
) -> Result<Root<Dom<NodeList>>, Error>;
}