From 76d7a44c4855badc22ce1b8be394c5669abfa1aa Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Tue, 20 Sep 2016 14:43:30 +0100 Subject: [PATCH] Add a separate section for Selection interface to address the issue #29. --- index.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index cec9222..44c559e 100644 --- a/index.html +++ b/index.html @@ -152,8 +152,7 @@

Definition

Every document ([[!DOM4]]) with a browsing context ([[!HTML5]]) - has a unique Selection object associated with it. - Selection objects are known as selections.

+ has a unique selection associated with it.

This is a requirement of the HTML spec. IE9 and Opera Next 12.00 alpha seem to follow it, while Firefox 12.0a1 and Chrome 17 dev seem not to. @@ -202,11 +201,20 @@

Definition

then the corresponding selection must initially be forwards. Otherwise, it must be directionless.

-

Selections also have an anchor and a focus. +

Each selections also have an anchor and a focus. If the selection's range is null, its anchor and focus are both null. If the selection's range is not null and its direction is forwards, its anchor is the range's start, and its focus is the end. Otherwise, its focus is the start and its anchor is the end.

+ + +
+

Selection interface

+ +

+ Selection interface provides a way to interact with the selection + associated with each document. +

readonly attribute Node? anchorNode