-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
"abort" Event Isn't Fired When Aborting Document Load #3525
Comments
Edge appears to fire it... although at the HTMLImageElement O_o |
I think the |
Thanks. Filed a Chromium bug: https://bugs.chromium.org/p/chromium/issues/detail?id=818788 |
Should we still keep the event in the spec, given that only one browser seems to do it, and that browser does it wrong? |
I think the abort event is important and needed because it reflects direct action and intent initiated by users. Users canceling/aborting/stopping page load is also a valid stage in an application's lifecycle. Making this event visible allows for more robust application development and gives options to developers when needed. The browsers already correctly execute the stop/cancel functionality internally. Browsers would only need to report when that functionality occurs by firing |
We should probably remove this given that no browser implements it. |
* Makes the discussion of user agent interface invoke "stop document loading", not "abort a document", since the browser stop button also cancels ongoing navigations. * Remove the "should" suggestion to fire an abort event. Closes #3525. Since this was the only case where abort was fired, this removes the event definition and event handler content attribute definition, effectively making use of the onabort="" content attribute nonconforming. (But, we keep the IDL definition in GlobalEventHandlers and the associated mapping.) * Tweaks the active document check in "stop document loading" to be more correct.
* Makes the discussion of user agent interface invoke "stop document loading", not "abort a document", since the browser stop button also cancels ongoing navigations. * Remove the "should" suggestion to fire an abort event. Closes #3525. Since this was the only case where abort was fired, this removes the event definition and event handler content attribute definition, effectively making use of the onabort="" content attribute nonconforming. (But, we keep the IDL definition in GlobalEventHandlers and the associated mapping.) * Tweaks the active document check in "stop document loading" to be more correct.
Is firing an "abort" event still a valid HTML specification?
According to 7.8.12 Aborting a document load, "the user agent should...fire an event named abort at that Document's Window object". I've been testing with this abort event detection page and cannot capture the "abort" event anywhere from any browser.
Detecting the "abort" event in Service Workers would also be extremely useful, as we could effectively manage our Streams, FetchEvents, etc, and react accordingly. For example, this Service Worker Progress Indicator has no way to detect when the user signaled an abort/cancel on the page load. Firefox effectively cancels the download (without firing an "abort" event that SW can intercept, but Chrome does not)
The text was updated successfully, but these errors were encountered: