[selection-api] Add APIs to save/restore selectiona (#42)

Forked from https://github.com/w3c/editing-explainer/issues/39.

To summarize:

1. In order for editors to move the selections temporary, do some work in other regions, then restore the selections back, we need a new APIs.
2. This APIs not only save all public properties of selections but also internal states as well, so that the selections can really be restored.
3. There are some details we need to take care of, such as IME uncommitted strings. Usually IME uncommitted strings are committed when the selections are changed. But since IME uncommitted strings are part of the internal selection states, and since we want to restore it later, UA should cancel them on save (or save then move the selection.) Not sure whether this should be spec'ed, just an informative note, or not needed in the spec though.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/42

Received on Saturday, 24 January 2015 13:37:18 UTC