-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit onselectionchange to Document until known to be needed elsewhere #75
Comments
I don't know what spec change you're proposing here. Could you clarify? |
I propose to move onselectionchange from GlobalEventHandlers to Document until the spec change that would cause the selectionchange event to fire anywhere other that on the document. |
Due to the issue #53, we're going to start firing onselectionchange on |
Do you expect that this will happen soon both in spec and implementation? If it could be a year out, it'd be a shame if any implementation moved onselectionchange to GlobalEventHandlers first, if |
I think Gecko has already done that. See https://bugzilla.mozilla.org/show_bug.cgi?id=571294 |
Oh, too late then. |
Done what? We currently only dispatch the selectionchange event on Document, but selectstart is dispatched to all elements, depending on the parent start node for the selection's range. Also, we haven't shipped this API, but we would like to, so we can change our implementation in whatever way that's needed. I unfortunately don't have access to reopen this issue, but if restricting the selectionchange handler to Document for now allows us to get to something that we can ship faster, that's ideal. |
Also to make it more clear, right now we expose |
As a WebKit implementor, I don't see any value in limiting this to |
I'm not saying that it should forever stay on just Document, just that the change in spec and implementations should coincide with making selectionchange fire on input and textarea elements. If that change never materializes, we'll be better off with the spec matching what is currently implemented. |
FWIW, https://fullscreen.spec.whatwg.org/#api adds event handlers on Document only. |
The thing is, I'm about to add |
Then |
Per the testing in #54 it looks like implementations have it only on Document, with the exception of WebKit which also has it on HTMLBodyElement.
There was talk of also firing the event on some elements, but that's not yet in the spec, moving onselectionchange to GlobalEventHandlers could make sense as part of that and be a form of feature detection.
The text was updated successfully, but these errors were encountered: