Re: [w3c/selection-api] Specify Selection.modify()? (#37)

I don't think we need to dispatch `beforeinput` for `Selection#modify()`, since we can use Proxy object or
manually override `Selection#modify()`. And make default action of UI events to call `Selection#modify()` instead of done in C++, e.g. default action of mouse double click to execute `window.getSelection().modify('extend`, 'forward', 'word')`.

Introducing `beforeselectionchange`, as replacement of `selectionstart`, with move/extent, direction, granularity is more suitable for watching selection change.

For measurement, I prefer to introduce "visible character iterator" rather than using `Range#expand()`. 
because of `Selection#modify()` uses "visible character" instead of DOM characters for ignoring collapsed whitespaces, display:none, etc.

In other words, I would like standardized what Blink/WebKit calls *visible position canonicalization* (not
reverse engineering of current implementation, though), to improve interoperability.



-- 
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/selection-api/issues/37#issuecomment-292093467

Received on Thursday, 6 April 2017 07:36:43 UTC