Re: [w3c/editing] Update spec draft, explainer, examples for EditContext (PR #355)

@alexkeng commented on this pull request.



> +        computeControlBound() { 
+            // implementation omitted for brevity 
+        } 
+
+        computeCharacterBounds(rangeStart, rangeEnd) {
+            // implementation omitted for brevity
+        }
+    }
+
+    class EditingController {
+        handleSelectionChange() {
+            // Authors are responsible to map the selection from the DOM space to the
+            // plain text space. One approach is to use range.toString() to get the plain text
+            // before the selection start/end, and use the text length as the selection index.
+            let s = document.getSelection()
+            let range = document.createRange()

sure, updated to new Range()

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/pull/355#discussion_r736017126

Received on Monday, 25 October 2021 22:41:07 UTC