pub(crate) trait RangeMethods<D: DomTypes> {
Show 26 methods
// Required methods
fn CommonAncestorContainer(&self) -> DomRoot<D::Node>;
fn SetStart(&self, refNode: &D::Node, offset: u32) -> Fallible<()>;
fn SetEnd(&self, refNode: &D::Node, offset: u32) -> Fallible<()>;
fn SetStartBefore(&self, refNode: &D::Node) -> Fallible<()>;
fn SetStartAfter(&self, refNode: &D::Node) -> Fallible<()>;
fn SetEndBefore(&self, refNode: &D::Node) -> Fallible<()>;
fn SetEndAfter(&self, refNode: &D::Node) -> Fallible<()>;
fn Collapse(&self, toStart: bool);
fn SelectNode(&self, refNode: &D::Node) -> Fallible<()>;
fn SelectNodeContents(&self, refNode: &D::Node) -> Fallible<()>;
fn CompareBoundaryPoints(
&self,
how: u16,
sourceRange: &D::Range,
) -> Fallible<i16>;
fn DeleteContents(&self) -> Fallible<()>;
fn ExtractContents(
&self,
_can_gc: CanGc,
) -> Fallible<DomRoot<D::DocumentFragment>>;
fn CloneContents(
&self,
_can_gc: CanGc,
) -> Fallible<DomRoot<D::DocumentFragment>>;
fn InsertNode(&self, node: &D::Node, _can_gc: CanGc) -> Fallible<()>;
fn SurroundContents(
&self,
newParent: &D::Node,
_can_gc: CanGc,
) -> Fallible<()>;
fn CloneRange(&self, _can_gc: CanGc) -> DomRoot<D::Range>;
fn Detach(&self);
fn IsPointInRange(&self, node: &D::Node, offset: u32) -> Fallible<bool>;
fn ComparePoint(&self, node: &D::Node, offset: u32) -> Fallible<i16>;
fn IntersectsNode(&self, node: &D::Node) -> bool;
fn Stringifier(&self) -> DOMString;
fn CreateContextualFragment(
&self,
fragment: DOMString,
_can_gc: CanGc,
) -> Fallible<DomRoot<D::DocumentFragment>>;
fn GetClientRects(&self, _can_gc: CanGc) -> DomRoot<D::DOMRectList>;
fn GetBoundingClientRect(&self, _can_gc: CanGc) -> DomRoot<D::DOMRect>;
fn Constructor(
global: &D::Window,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
) -> Fallible<DomRoot<D::Range>>;
}
Required Methods§
fn CommonAncestorContainer(&self) -> DomRoot<D::Node>
fn SetStart(&self, refNode: &D::Node, offset: u32) -> Fallible<()>
fn SetEnd(&self, refNode: &D::Node, offset: u32) -> Fallible<()>
fn SetStartBefore(&self, refNode: &D::Node) -> Fallible<()>
fn SetStartAfter(&self, refNode: &D::Node) -> Fallible<()>
fn SetEndBefore(&self, refNode: &D::Node) -> Fallible<()>
fn SetEndAfter(&self, refNode: &D::Node) -> Fallible<()>
fn Collapse(&self, toStart: bool)
fn SelectNode(&self, refNode: &D::Node) -> Fallible<()>
fn SelectNodeContents(&self, refNode: &D::Node) -> Fallible<()>
fn CompareBoundaryPoints( &self, how: u16, sourceRange: &D::Range, ) -> Fallible<i16>
fn DeleteContents(&self) -> Fallible<()>
fn ExtractContents( &self, _can_gc: CanGc, ) -> Fallible<DomRoot<D::DocumentFragment>>
fn CloneContents( &self, _can_gc: CanGc, ) -> Fallible<DomRoot<D::DocumentFragment>>
fn InsertNode(&self, node: &D::Node, _can_gc: CanGc) -> Fallible<()>
fn SurroundContents(&self, newParent: &D::Node, _can_gc: CanGc) -> Fallible<()>
fn CloneRange(&self, _can_gc: CanGc) -> DomRoot<D::Range>
fn Detach(&self)
fn IsPointInRange(&self, node: &D::Node, offset: u32) -> Fallible<bool>
fn ComparePoint(&self, node: &D::Node, offset: u32) -> Fallible<i16>
fn IntersectsNode(&self, node: &D::Node) -> bool
fn Stringifier(&self) -> DOMString
fn CreateContextualFragment( &self, fragment: DOMString, _can_gc: CanGc, ) -> Fallible<DomRoot<D::DocumentFragment>>
fn GetClientRects(&self, _can_gc: CanGc) -> DomRoot<D::DOMRectList>
fn GetBoundingClientRect(&self, _can_gc: CanGc) -> DomRoot<D::DOMRect>
fn Constructor( global: &D::Window, proto: Option<HandleObject<'_>>, can_gc: CanGc, ) -> Fallible<DomRoot<D::Range>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.