From 870ba05ed1199ce440a3f7376a0248569a6f9027 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 30 Mar 2017 13:27:05 +0200 Subject: [PATCH] Editorial: use JavaScript string length --- dom.bs | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/dom.bs b/dom.bs index be8fdf3e8..004482c8e 100644 --- a/dom.bs +++ b/dom.bs @@ -1836,7 +1836,7 @@ can be used to explore this matter in more detail.
{{Text}}
{{ProcessingInstruction}}
{{Comment}} -

The number of code units in its data. +

Its data's length.

Any other node

Its number of children. @@ -7016,10 +7016,8 @@ To replace data of node node data after offset code units. -

  • Let delete offset be offset plus - the number of - code units in - data. +
  • Let delete offset be offset + data's + length.
  • Starting from delete offset code units, remove @@ -7046,23 +7044,14 @@ To replace data of node node end offset to offset. -
  • For each range whose - start node is - node and - start offset is greater than - offset plus count, increase its - start offset by the number of - code units in - data, then decrease it by count. +
  • For each range whose start node is node and + start offset is greater than offset plus count, increase its + start offset by data's length and decrease it by + count. -
  • For each range whose - end node is - node and - end offset is greater than - offset plus count, increase its - end offset by the number of - code units in - data, then decrease it by count. +
  • For each range whose end node is node and end offset + is greater than offset plus count, increase its end offset by + data's length and decrease it by count.
  • If node is a {{Text}} node and its parent is not null, run the child text content change steps for node's parent.