[worklets] Create ability for code to be loaded into worklets declaratively. #47

Open
bfgeek opened this Issue Oct 8, 2015 · 3 comments

Comments

Projects
None yet
4 participants
@bfgeek
Contributor

bfgeek commented Oct 8, 2015

This is so that script doesn't have to be run to load code into an isolated worker. User agents can also do standard tricks like pre-fetching before html document is parsed.

This probably wants to be done with something like a tag. I.e.

<link href="paint.js" rel="paint-worker" />
@upsuper

This comment has been minimized.

Show comment
Hide comment
@upsuper

upsuper Jan 30, 2016

Member

Probably something in CSS file like @import-worklet url;?

Member

upsuper commented Jan 30, 2016

Probably something in CSS file like @import-worklet url;?

@bfgeek

This comment has been minimized.

Show comment
Hide comment
@bfgeek

bfgeek Feb 12, 2016

Contributor

Service worker has done something similar with a link element. See:
w3c/ServiceWorker#828
http://mkruisselbrink.github.io/ServiceWorker/spec/service_worker/#link-type-serviceworker

For them they use a link element like:
<link rel="serviceworker" href="/js/sw.js" scope="/">

We'd probably do something similar like:
<link rel="workletname" href="/js/sw.js">

There was talk in the Sydney F2F that we might want to use the <script> tag instead, however it seems like, link is a better fit here.

@upsuper Yup, something in CSS would also be nice 👍

Contributor

bfgeek commented Feb 12, 2016

Service worker has done something similar with a link element. See:
w3c/ServiceWorker#828
http://mkruisselbrink.github.io/ServiceWorker/spec/service_worker/#link-type-serviceworker

For them they use a link element like:
<link rel="serviceworker" href="/js/sw.js" scope="/">

We'd probably do something similar like:
<link rel="workletname" href="/js/sw.js">

There was talk in the Sydney F2F that we might want to use the <script> tag instead, however it seems like, link is a better fit here.

@upsuper Yup, something in CSS would also be nice 👍

@bfgeek bfgeek changed the title from [isolated-workers] Create ability for code to be loaded into isolated workers declaratively. to [isolated-workers] Create ability for code to be loaded into worklets declaratively. Mar 11, 2016

@bfgeek bfgeek changed the title from [isolated-workers] Create ability for code to be loaded into worklets declaratively. to [worklets] Create ability for code to be loaded into worklets declaratively. Mar 11, 2016

@shans shans added the worklets-2 label Mar 11, 2016

@bfgeek bfgeek removed the worklets-1 label Mar 11, 2016

@bfgeek bfgeek added the worklets-1 label Jan 10, 2017

@atanassov

This comment has been minimized.

Show comment
Hide comment
@atanassov

atanassov Jan 10, 2017

From Houdini F2F Seattle - recommend adding a section that describes the feature in a declarative form even if it is not complete.

From Houdini F2F Seattle - recommend adding a section that describes the feature in a declarative form even if it is not complete.

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