Skip to content

[@web/dev-server-core] Listening for the unload event throws an error in Chrome #3150

Description

@svanherk

Chrome is deprecating the unload event in a slow percentage-based rollout, so this error will become more prominent with each Chromium release.

Because @web/dev-server-core adds an event listener for unload, this error is thrown:

[Violation] Permissions policy violation: unload is not allowed in this document.

You can reproduce this by enabling the Chrome flag as described here to make it happen every time.

It looks like listening for this event was added recently in #3135, as a way to disable the back/forward cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions