Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Support loading in a Service Worker #374

@matthewp

Description

@matthewp
Contributor

I think this would work if https://github.com/ModuleLoader/es6-module-loader/blob/master/src/system.js#L64 checked for global.fetch and used that.

Activity

guybedford

guybedford commented on May 15, 2015

@guybedford
Member

Does XHR not work inside of service workers?

OliverJAsh

OliverJAsh commented on May 15, 2015

@OliverJAsh

How would we download and execute SystemJS in a service worker at all?

matthewp

matthewp commented on May 15, 2015

@matthewp
ContributorAuthor

@guybedford I believe not, it's hitting the throw in this case. Eventually all environments will support fetch so it would be nice to make that the default anyways.

@OliverJAsh You can execute any script as a service worker, so that includes es6ml. You might want to bundle it with some other script that calls System.import if you want it to actually do something though.

guybedford

guybedford commented on May 15, 2015

@guybedford
Member

Ok, sure, yes it makes sense to use fetch if its supported as an API here anyway.

added a commit that references this issue on Nov 8, 2015
guybedford

guybedford commented on Feb 10, 2016

@guybedford
Member

I believe support for this was added in #448.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @matthewp@guybedford@OliverJAsh

        Issue actions

          Support loading in a Service Worker · Issue #374 · ModuleLoader/es-module-loader