What is the issue with the HTML Standard?
In step 25 of #inner-navigate-event-firing-algorithm we assert that #ongoing-navigate-event is null, but I don't think this is necessarily true.
The current partial implementation in Gecko asserts at that step for the following test:
<script>
addEventListener(
"load",
async () => {
navigation.onnavigate = () => {};
history.pushState(1, null, "#1");
history.pushState(1, null, "#2");
},
{ once: true }
);
</script>
Looking at Chromium source, we see that #inform-the-navigation-api-about-aborting-navigation is called in NavigationApi::DispatchNavigateEvent, and indeed if I add a call to #inform-the-navigation-api-about-aborting-navigation in Gecko's implementation of #inner-navigate-event-firing-algorithm the assert obviously stops being a problem.
Thing is that I'm not entirely sure that this is the correct solution, but as far as I've been able to glean from the spec, there is nowhere a call to #abort-the-ongoing-navigation when doing two consecutive calls to history.pushState.
What is the issue with the HTML Standard?
In step 25 of #inner-navigate-event-firing-algorithm we assert that #ongoing-navigate-event is null, but I don't think this is necessarily true.
The current partial implementation in Gecko asserts at that step for the following test:
Looking at Chromium source, we see that #inform-the-navigation-api-about-aborting-navigation is called in NavigationApi::DispatchNavigateEvent, and indeed if I add a call to #inform-the-navigation-api-about-aborting-navigation in Gecko's implementation of #inner-navigate-event-firing-algorithm the assert obviously stops being a problem.
Thing is that I'm not entirely sure that this is the correct solution, but as far as I've been able to glean from the spec, there is nowhere a call to #abort-the-ongoing-navigation when doing two consecutive calls to
history.pushState.