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
scoped and relatedTargetScoped attributes are useless in Event, so remove then from Event interface #442
Comments
One reason that scoped and relatedTargetScoped exist is to expose the internal property to event consumers. If it is writable, maybe another use case is that when you create and dispatch your own event (e.g. "myXYZgesture" event), you can specify the behavior by setting these flags (though they are marked "readonly" now). |
I don't know. I initially thought these would be arguments to the dispatch algorithm, but perhaps it makes sense to have them be members of event instead. If they are members of events, we should probably also expose them (so a tree can see whether the event has leaked the tree or not). |
What is the use case for the flags? I mean real world use case. I'm not strongly against them, mostly just wondering whether we're adding something no one will ever use. |
Yeah, AFAIK, we have never heard any real use case. |
@smaug---- I think the idea behind these flags is to explain the behavior of certain events. The alternative is special casing certain event names, but that seems horrendous (the specification suggests it's using this pattern, but that's meant to be updated by setting these flags where necessary instead). And if there's a need for the platform to dispatch events that are scoped in some way, is it not reasonable for developers to have the same need? |
"explain" the platform tends to be a buzz word ;) But ok, I think there is a use case for these. It is when dealing with nested shadow DOMs. Closing. Sorry about the noise. |
I am okay to close this issue. Just for clarification, even if we remove One more thing: |
I think we should keep the properties and we should indeed not let them be changed dynamically (due to capturing existing that would not make much sense, since if you wanted to prevent leaks during dispatch it would already be too late). Thanks everyone for going through this one more time. I'll try to incorporate these into the DOM Standard soonish. |
Yeah, both of these properties on |
They are useful for calculating event path, but I can't see any use case for them in JS.
The text was updated successfully, but these errors were encountered: