What is the issue with the HTML Standard?
https://html.spec.whatwg.org/multipage/browsing-the-web.html#:~:text=If%20targetEntry%27s%20document%20is%20null%2C%20then%20set
handles target entries document being null. Later steps, such as the one immediately after it deference that document.
Perhaps logic should be something like:
If targetEntry's document is not null:
If document origin differs from oldOrigin:
clear classic history API state.
If the top-level/opener/origin conditions hold:
clear the navigable target name.
Some further steps in step 14 also deference this potentially null document
What is the issue with the HTML Standard?
https://html.spec.whatwg.org/multipage/browsing-the-web.html#:~:text=If%20targetEntry%27s%20document%20is%20null%2C%20then%20set
handles target entries document being null. Later steps, such as the one immediately after it deference that document.
Perhaps logic should be something like:
Some further steps in step 14 also deference this potentially null document