Skip to content

Add Service Worker Support #1076

Description

Hi!

Is your feature request related to a problem? Please describe.
We have a Chrome extension that sends events using your lib in the foreground (called content script) and in the background (a service worker). In the foreground, we can use your browser tracker without problems, but we can't use this in the service worker due to these issues:

  • Browser Tracker needs a window object to work, and service workers don't have it.
  • Browser Tracker uses XHR to send events, and service workers use fetch only.

We developed a workaround to send events in the background using the Core Tracker and a port of the Node Emitter, but using fetch instead of got.

Describe the solution you'd like
It would be nice if your library supported service workers.

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementNew features or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions