-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Add more init*Event()? #1054
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
Comments
|
Right. For compatibility with Web pages that use them, those pages will probably still be broken if the relevant init*Event method is not defined. We went through this in https://www.w3.org/Bugs/Public/show_bug.cgi?id=25907 :-) |
cc @ayg |
I edited the OP to include the Edge results. |
This comment may be of interest:
http://hg.mozilla.org/mozilla-central/file/1da1937a9e03/dom/events/EventDispatcher.cpp#l915 Anyway, though, adding init*Event methods that most browsers support makes sense too, yes. Result of concatenation of the four lists followed by sort | uniq -c | sort -nr:
|
In the simplest case all of them can be initial via |
Should we close this now, or are there more we know are hard to remove and should be added? @inexorabletash? (via https://bugs.chromium.org/p/chromium/issues/detail?id=697170#c4) |
Sorry, missed the ping, and I'm unsure of the goal here. There are a set of init*Event() methods that are implemented in browsers, but not standardized. Are we hoping to remove those from browsers rather than documenting? |
I think the only remaining non-standard one that would end up HTML is initStorageEvent (https://bugs.chromium.org/p/chromium/issues/detail?id=697170#c4) and from web-confluence.appspot.com I can see that it's all browsers. So we should probably just add that one? |
Here it is in Blink, Gecko and WebKit:
I'd suggest this definition: void initStorageEvent(DOMString type,
optional boolean bubbles = false,
optional boolean cancelable = false,
optional DOMString? key = null,
optional DOMString? oldValue = null,
optional DOMString? newValue = null,
optional USVString url = "",
optional Storage? storageArea = null); |
Ah! SGTM. That looks fine. Looks like there might be variation in how null/undefined for |
Yes, there will be some differences in number of required arguments, maybe default values, and probably in how undefined is interpreted. Will require some tests indeed. Probably doesn't matter much though :) |
Tests: web-platform-tests/wpt#13368 Fixes #1054.
Tests: web-platform-tests/wpt#13368 Fixes #1054.
Tests: web-platform-tests/wpt#13368 Fixes whatwg#1054.
Tests: web-platform-tests/wpt#13368 Fixes whatwg#1054.
Uh oh!
There was an error while loading. Please reload this page.
See whatwg/dom@9e3ce67
For these event interfaces we should check if they need
init*Event
methods. Just supporting them increateEvent
is pretty pointless if it still throws for theinit*Event
call...http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4067
WebKit:
Chromium:
Gecko:
Edge:
The text was updated successfully, but these errors were encountered: