Skip to content

Change background page to event page? #79

@emilgoldsmith

Description

@emilgoldsmith

From Event Pages Documentation:

A common need for apps and extensions is to have a single long-running script to manage some task or state. Event pages to the rescue. Event pages are loaded only when they are needed. When the event page is not actively doing something, it is unloaded, freeing memory and other system resources.

Event pages are available in the stable channel as of Chrome 22, and the performance advantages are significant, especially on low-power devices. Please prefer them to persistent background pages whenever possible for new development and begin migrating existing background pages to this new model.

Could we do this? It looks like it to me. Migration guide is here.

From a quick maybe very bad search it didn't seem like Firefox supported it, but if I'm not wrong the only thing we'd need to change is the manifest, and that makes it super simple to keep them apart as they already have different manifests.

I see we promisify everything which I'm not quite sure exactly what means in practice, and why we're doing it. But will we need to do point 3 in the migration guide because of that?

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