Open kalenikaliaksandr opened 6 months ago
Again, it would be really helpful if you had any fix suggestions with these bug reports :)
sure, to fix this one, steps need to be rearranged to keep document fully active until all tasks scheduled by destroy a document and its descendants are completed.
probably the most obvious way to implement this is by adding destroyed
flag to each navigable and change steps of destroy a child navigable to do:
Let navigable be container's content navigable.
If navigable is null, then return.
if navigable.destroyed is true then return.
navigable.destroyed = true.
Set container's content navigable to null.
Inform the navigation API about child navigable destruction given navigable.
Destroy a document and its descendants given navigable's active document. and afterAllDestruction steps set to do following:
the rest of existing steps
What is the issue with the HTML Standard?
Steps to reproduce:
Non of the tasks scheduled on step 5 "Destroy a document and its descendants given navigable's active document." will be executed because document is no longer fully active.
Bug was introduced in https://github.com/whatwg/html/commit/4ca6ec020803cbdfd05f90475b6e3a3a0d5b2424 cc @domenic