Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

@bfgeek
Copy link
Contributor

@bfgeek 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
Copy link
Member

@upsuper upsuper commented Jan 30, 2016

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

@bfgeek
Copy link
Contributor Author

@bfgeek 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 [isolated-workers] Create ability for code to be loaded into isolated workers declaratively. [isolated-workers] Create ability for code to be loaded into worklets declaratively. Mar 11, 2016
@bfgeek bfgeek changed the title [isolated-workers] Create ability for code to be loaded into worklets declaratively. [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
Copy link

@atanassov atanassov commented 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.

majido pushed a commit to majido/css-houdini-drafts that referenced this issue Aug 8, 2018
Construct the timelines information from DocumentTimelineOptions/ScrollTimelineOptions (w3c#40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.