Skip to content

When navigating away from about:blank navigation.activation.from should be null #60002

@farre

Description

@farre

This is not what navigation-api/navigation-activation/activation-initial-about-blank.html tests.

The test asserts that after an iframe navigates away from its initial about:blank:

assert_equals(i.contentWindow.navigation.activation.from.url, "about:blank");
assert_equals(i.contentWindow.navigation.activation.from.index, -1);

Per the HTML spec, navigation.activation.from should be null in this case, so accessing .url/.index should throw.

  • NavigationActivation's from attribute description (HTML#navigation-activation-interface) states from is null "if [the previous Document] was the initial about:blank Document".
  • The initial about:blank can never appear as a NavigationHistoryEntry anywhere: HTML#dom-navigation-entries returns the empty list when the navigation has entries and events disabled, which is true whenever the document's is initial about:blank is true. So an activation.from pointing at the initial about:blank is not just spec-incorrect — there is no entry it could legitimately be.
  • "Update document for history step application" step 7 (HTML#updating-the-document) only sets the activation's old entry if the previous SHE is in the entry list, or if the navigation is replace+same-origin and the previous document's is initial about:blank is false. Both conditions fail when navigating away from the initial about:blank, so old entry stays null.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions