pub trait SelectionMethods<D: DomTypes> {
Show 22 methods
// Required methods
fn GetAnchorNode(&self) -> Option<Root<Dom<Node>>>;
fn AnchorOffset(&self) -> u32;
fn GetFocusNode(&self) -> Option<Root<Dom<Node>>>;
fn FocusOffset(&self) -> u32;
fn IsCollapsed(&self) -> bool;
fn RangeCount(&self) -> u32;
fn Type(&self) -> DOMString;
fn GetRangeAt(&self, index: u32) -> Result<Root<Dom<Range>>, Error>;
fn AddRange(&self, range: &Range);
fn RemoveRange(&self, range: &Range) -> Result<(), Error>;
fn RemoveAllRanges(&self);
fn Empty(&self);
fn Collapse(
&self,
node: Option<&Node>,
offset: u32,
_can_gc: CanGc,
) -> Result<(), Error>;
fn SetPosition(
&self,
node: Option<&Node>,
offset: u32,
_can_gc: CanGc,
) -> Result<(), Error>;
fn CollapseToStart(&self, _can_gc: CanGc) -> Result<(), Error>;
fn CollapseToEnd(&self, _can_gc: CanGc) -> Result<(), Error>;
fn Extend(
&self,
node: &Node,
offset: u32,
_can_gc: CanGc,
) -> Result<(), Error>;
fn SetBaseAndExtent(
&self,
anchorNode: &Node,
anchorOffset: u32,
focusNode: &Node,
focusOffset: u32,
_can_gc: CanGc,
) -> Result<(), Error>;
fn SelectAllChildren(
&self,
node: &Node,
_can_gc: CanGc,
) -> Result<(), Error>;
fn DeleteFromDocument(&self) -> Result<(), Error>;
fn ContainsNode(&self, node: &Node, allowPartialContainment: bool) -> bool;
fn Stringifier(&self) -> DOMString;
}