On 1/12/12 10:58 AM, Aryeh Gregor wrote:
* Firefox 12.0a1 and Opera Next 12.00 alpha return the same thing as document.getSelection().
In Gecko, this is arguably an implementation bug. It returns the selection associated with a particular Window object. Which Window that is depends on how the document was created; I don't know that there's any such concept in the spec.
Gecko/WebKit/Opera, we have to decide how to identify which documents get their own selections and which don't. The definition should probably be something like "documents that are returned by the .document property of some window", but I have no idea if that's a sane way to phrase it.
Documents that have a non-null defaultView? Note that this may not be equivalent to your formulation, by the way....
-Boris