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
According to the spec, the loadend event is synchronously fired right after the load event is dispatched. This all happens inside a single "queue a task". This means that the load and loadend events should be fired in the same turn of the event loop. There is no separate "queue a task" for the dispatching of the loadend event.
The WPT test for this does not agree however. It tests that the loadend event is dispatched one turn of the event loop later (note the await point between eventWatcher.wait_for('load') and eventWatcher.wait_for('loadend')):
So my question: as all browsers agree to disagree here, should the spec be updated? Alternatively I can file issues with all vendors to get this aligned to spec (and correct the test).
The text was updated successfully, but these errors were encountered:
Disclaimer: I might be wrong!
According to the spec, the
loadend
event is synchronously fired right after theload
event is dispatched. This all happens inside a single "queue a task". This means that theload
andloadend
events should be fired in the same turn of the event loop. There is no separate "queue a task" for the dispatching of theloadend
event.The WPT test for this does not agree however. It tests that the
loadend
event is dispatched one turn of the event loop later (note the await point betweeneventWatcher.wait_for('load')
andeventWatcher.wait_for('loadend')
):The test that would agree with spec behaviour would be the following:
All of Chrome, Firefox and Safari implement this according to the current WPT test: https://wpt.fyi/results/FileAPI/reading-data-section/filereader_events.any.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned
So my question: as all browsers agree to disagree here, should the spec be updated? Alternatively I can file issues with all vendors to get this aligned to spec (and correct the test).
The text was updated successfully, but these errors were encountered: