Struct script::dom::range::WeakRangeVec
source · pub struct WeakRangeVec {
cell: UnsafeCell<WeakRefVec<Range>>,
}
Fields§
§cell: UnsafeCell<WeakRefVec<Range>>
Implementations§
source§impl WeakRangeVec
impl WeakRangeVec
sourcepub fn increase_above(&self, node: &Node, offset: u32, delta: u32)
pub fn increase_above(&self, node: &Node, offset: u32, delta: u32)
Used for steps 2.1-2. when inserting a node. https://dom.spec.whatwg.org/#concept-node-insert
sourcepub fn decrease_above(&self, node: &Node, offset: u32, delta: u32)
pub fn decrease_above(&self, node: &Node, offset: u32, delta: u32)
Used for steps 4-5. when removing a node. https://dom.spec.whatwg.org/#concept-node-remove
sourcepub fn drain_to_parent(&self, context: &UnbindContext<'_>, child: &Node)
pub fn drain_to_parent(&self, context: &UnbindContext<'_>, child: &Node)
Used for steps 2-3. when removing a node. https://dom.spec.whatwg.org/#concept-node-remove
sourcepub fn drain_to_preceding_text_sibling(
&self,
node: &Node,
sibling: &Node,
length: u32
)
pub fn drain_to_preceding_text_sibling(
&self,
node: &Node,
sibling: &Node,
length: u32
)
Used for steps 7.1-2. when normalizing a node. https://dom.spec.whatwg.org/#dom-node-normalize
sourcepub fn move_to_text_child_at(
&self,
node: &Node,
offset: u32,
child: &Node,
new_offset: u32
)
pub fn move_to_text_child_at(
&self,
node: &Node,
offset: u32,
child: &Node,
new_offset: u32
)
Used for steps 7.3-4. when normalizing a node. https://dom.spec.whatwg.org/#dom-node-normalize
sourcepub fn replace_code_units(
&self,
node: &Node,
offset: u32,
removed_code_units: u32,
added_code_units: u32
)
pub fn replace_code_units(
&self,
node: &Node,
offset: u32,
removed_code_units: u32,
added_code_units: u32
)
Used for steps 8-11. when replacing character data. https://dom.spec.whatwg.org/#concept-cd-replace
sourcepub fn move_to_following_text_sibling_above(
&self,
node: &Node,
offset: u32,
sibling: &Node
)
pub fn move_to_following_text_sibling_above(
&self,
node: &Node,
offset: u32,
sibling: &Node
)
Used for steps 7.2-3. when splitting a text node. https://dom.spec.whatwg.org/#concept-text-split
sourcepub fn increment_at(&self, node: &Node, offset: u32)
pub fn increment_at(&self, node: &Node, offset: u32)
Used for steps 7.4-5. when splitting a text node. https://dom.spec.whatwg.org/#concept-text-split