Skip to main content

SelectionMethods

pub trait SelectionMethods<D: DomTypes> {
Show 24 methods // Required methods fn GetAnchorNode(&self, cx: &mut JSContext) -> Option<DomRoot<D::Node>>; fn AnchorOffset(&self, cx: &mut JSContext) -> u32; fn GetFocusNode(&self, cx: &mut JSContext) -> Option<DomRoot<D::Node>>; fn FocusOffset(&self, cx: &mut JSContext) -> u32; fn IsCollapsed(&self, cx: &mut JSContext) -> bool; fn RangeCount(&self) -> u32; fn Type(&self) -> DOMString; fn Direction(&self) -> DOMString; fn GetRangeAt( &self, cx: &mut JSContext, index: u32, ) -> Fallible<DomRoot<D::Range>>; fn AddRange(&self, cx: &NoGC, range: &D::Range); fn RemoveRange(&self, cx: &NoGC, range: &D::Range) -> Fallible<()>; fn RemoveAllRanges(&self, cx: &NoGC); fn Empty(&self, cx: &NoGC); fn GetComposedRanges( &self, cx: &mut JSContext, options: &GetComposedRangesOptions<D>, ) -> Vec<DomRoot<D::StaticRange>> ; fn Collapse( &self, cx: &mut JSContext, node: Option<&D::Node>, offset: u32, ) -> Fallible<()>; fn SetPosition( &self, cx: &mut JSContext, node: Option<&D::Node>, offset: u32, ) -> Fallible<()>; fn CollapseToStart(&self, cx: &mut JSContext) -> Fallible<()>; fn CollapseToEnd(&self, cx: &mut JSContext) -> Fallible<()>; fn Extend( &self, cx: &mut JSContext, node: &D::Node, offset: u32, ) -> Fallible<()>; fn SetBaseAndExtent( &self, cx: &mut JSContext, anchorNode: &D::Node, anchorOffset: u32, focusNode: &D::Node, focusOffset: u32, ) -> Fallible<()>; fn SelectAllChildren( &self, cx: &mut JSContext, node: &D::Node, ) -> Fallible<()>; fn DeleteFromDocument(&self, cx: &mut JSContext) -> Fallible<()>; fn ContainsNode( &self, cx: &NoGC, node: &D::Node, allowPartialContainment: bool, ) -> bool; fn Stringifier(&self, cx: &mut JSContext) -> DOMString;
}

Required Methods§

Source

fn GetAnchorNode(&self, cx: &mut JSContext) -> Option<DomRoot<D::Node>>

Source

fn AnchorOffset(&self, cx: &mut JSContext) -> u32

Source

fn GetFocusNode(&self, cx: &mut JSContext) -> Option<DomRoot<D::Node>>

Source

fn FocusOffset(&self, cx: &mut JSContext) -> u32

Source

fn IsCollapsed(&self, cx: &mut JSContext) -> bool

Source

fn RangeCount(&self) -> u32

Source

fn Type(&self) -> DOMString

Source

fn Direction(&self) -> DOMString

Source

fn GetRangeAt( &self, cx: &mut JSContext, index: u32, ) -> Fallible<DomRoot<D::Range>>

Source

fn AddRange(&self, cx: &NoGC, range: &D::Range)

Source

fn RemoveRange(&self, cx: &NoGC, range: &D::Range) -> Fallible<()>

Source

fn RemoveAllRanges(&self, cx: &NoGC)

Source

fn Empty(&self, cx: &NoGC)

Source

fn GetComposedRanges( &self, cx: &mut JSContext, options: &GetComposedRangesOptions<D>, ) -> Vec<DomRoot<D::StaticRange>>

Source

fn Collapse( &self, cx: &mut JSContext, node: Option<&D::Node>, offset: u32, ) -> Fallible<()>

Source

fn SetPosition( &self, cx: &mut JSContext, node: Option<&D::Node>, offset: u32, ) -> Fallible<()>

Source

fn CollapseToStart(&self, cx: &mut JSContext) -> Fallible<()>

Source

fn CollapseToEnd(&self, cx: &mut JSContext) -> Fallible<()>

Source

fn Extend( &self, cx: &mut JSContext, node: &D::Node, offset: u32, ) -> Fallible<()>

Source

fn SetBaseAndExtent( &self, cx: &mut JSContext, anchorNode: &D::Node, anchorOffset: u32, focusNode: &D::Node, focusOffset: u32, ) -> Fallible<()>

Source

fn SelectAllChildren(&self, cx: &mut JSContext, node: &D::Node) -> Fallible<()>

Source

fn DeleteFromDocument(&self, cx: &mut JSContext) -> Fallible<()>

Source

fn ContainsNode( &self, cx: &NoGC, node: &D::Node, allowPartialContainment: bool, ) -> bool

Source

fn Stringifier(&self, cx: &mut JSContext) -> DOMString

Implementors§