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§
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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".