Skip to content

[Navigation API] Change opener-postMessage to use onpageshow instead of onload #1200

@RupinMittal

Description

@RupinMittal

Test List

navigation-api/navigate-event/cross-origin-traversal-does-not-fire-navigate.html
navigation-api/navigate-event/navigation-back-cross-document-preventDefault.html

See:
web-platform-tests/wpt#55293

Rationale

The secondary page may be cached. In that scenario, once it's restored, the onload event won't fire. But the onpageshow event will. To make the tests work, we change it to use onpageshow instead of onload.

This is the spec's steps for reactivating a document from the cache: https://html.spec.whatwg.org/multipage/browsing-the-web.html#reactivate-a-document. It clearly states that a pageshow event must be fired. It does not mandate that an onload event be fired.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions