pub struct Selection { /* private fields */ }
Expand description
The Selection
class.
This API requires the following crate features to be activated: Selection
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn anchor_node(&self) -> Option<Node>
pub fn anchor_node(&self) -> Option<Node>
Getter for the anchorNode
field of this object.
This API requires the following crate features to be activated: Node
, Selection
Source§impl Selection
impl Selection
Sourcepub fn anchor_offset(&self) -> u32
pub fn anchor_offset(&self) -> u32
Getter for the anchorOffset
field of this object.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Sourcepub fn focus_node(&self) -> Option<Node>
pub fn focus_node(&self) -> Option<Node>
Getter for the focusNode
field of this object.
This API requires the following crate features to be activated: Node
, Selection
Source§impl Selection
impl Selection
Sourcepub fn focus_offset(&self) -> u32
pub fn focus_offset(&self) -> u32
Getter for the focusOffset
field of this object.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Sourcepub fn is_collapsed(&self) -> bool
pub fn is_collapsed(&self) -> bool
Getter for the isCollapsed
field of this object.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Sourcepub fn range_count(&self) -> u32
pub fn range_count(&self) -> u32
Getter for the rangeCount
field of this object.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Sourcepub fn collapse_to_end(&self) -> Result<(), JsValue>
pub fn collapse_to_end(&self) -> Result<(), JsValue>
The collapseToEnd()
method.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Sourcepub fn collapse_to_start(&self) -> Result<(), JsValue>
pub fn collapse_to_start(&self) -> Result<(), JsValue>
The collapseToStart()
method.
This API requires the following crate features to be activated: Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Source§impl Selection
impl Selection
Sourcepub fn delete_from_document(&self) -> Result<(), JsValue>
pub fn delete_from_document(&self) -> Result<(), JsValue>
The deleteFromDocument()
method.
This API requires the following crate features to be activated: Selection