You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not possible to use feature detection of onhashchange in jsdom 7.2.1 like so:
if("onhashchange"inwindow){console.log("The browser supports the hashchange event!");}
The message does not print from the code above. However, this is my work-a-round for now:
// HACK: When in a browser, the default value for onhashchange is null, but jsdom sets it to undefined.
window.onhashchange = null;
if ("onhashchange" in window) {
console.log("The browser supports the hashchange event!");
}
The text was updated successfully, but these errors were encountered:
@Sebmaster this looks to be not fixed and also the current situation is confusing. WindowEventHandlers does not have an implementation at all, so won't that break the onxyzs on body? It also isn't mixed in to Window. (Nor is GlobalEventHandlers.)
A quick fix might be to comment out all of the contents of WindowEventHandlers.idl and GlobalEventHandlers.idl as TODOs. What do you think?
To clarify in this issue: There is no change to this in master and this should behave as it did in 7.2.x, so we won't have to change anything immediately. To solve this perfectly we'll need to properly implement inline event handlers. It's a change that will come soon, but probably not before the next major release.
This exposes getters/setters for all the on[event] properties on the prototype, thus closing #1354. It also slots them into the correct place in the attribute list upon setting, thus closing #696. Along the way, it generally makes all the event handler processing per-spec; we pass many more web platform tests in this area.
Not possible to use feature detection of onhashchange in jsdom 7.2.1 like so:
The message does not print from the code above. However, this is my work-a-round for now:
The text was updated successfully, but these errors were encountered: