Skip to content

Add support for modules in limited event pages #289

@carlosjeurissen

Description

@carlosjeurissen

Currently Google Chrome supports "type": "module" for background serviceWorkers. During our 2022-10-13 meeting, while discussing #282, Safari and Firefox agreed it makes sense to also add support "type": "module" for limited event pages.

Basically given this syntax in manifest.json:

"background": {
  "scripts": ["script1.js", "script2.js"],
  "type": "module"
}

The browser would generate a _generated_background_page.html which looks like this:

<head></head><body>
<script type="module" src="script1.js"></script>
<script type="module" src="script2.js"></script>
</body>

Dedicated issue on the Mozilla bugtracker:
https://bugzilla.mozilla.org/show_bug.cgi?id=1811443

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