Skip to content

Commit 40f3917

Browse files
committed
[worklets] Fill in privacy and security sections of worklets.
Fixes #92. (better late than never? ;) Broadly speaking worklets should be allowed in non-secure contexts as downstream specs may want to use them there. CSP wise this should work the same as workers, using the "child-src" directive. I've filed issue #378 to allow each downstream spec to use a unique destination, e.g. "paintworklet", "audioworklet", etc. The CSP spec should probably be extended to have a "worklet-src" directive (as there is now a "worker-src" directive now?).
1 parent a8616be commit 40f3917

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

worklets/Overview.bs

+29-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Editor: Ian Kilpatrick, ikilpatrick@chromium.org
1313
<pre class="anchors">
1414
urlPrefix: http://heycam.github.io/webidl/; type: dfn;
1515
text: AbortError
16+
text: SecureContext
1617
text: SyntaxError
1718
urlPrefix: #idl-;
1819
text: DOMException
@@ -41,6 +42,7 @@ urlPrefix: https://html.spec.whatwg.org/multipage/webappapis.html; type: dfn;
4142
text: event loop
4243
text: event loop processing model
4344
text: fetch a module script tree
45+
text: fetch a single module script
4446
text: global object
4547
text: https state
4648
text: incumbent settings object
@@ -410,7 +412,33 @@ loops and callbacks exceeding imposed time limits.
410412
Security Considerations {#security-considerations}
411413
==================================================
412414

413-
Issue(w3c/css-houdini-drafts#92): Need to decide if to allow worklets for unsecure context, etc.
415+
Worklets do not introduce any usable API surface to the web themselves, instead other
416+
specifications, e.g. [[css-paint-api-1]], [[webaudio]] will extend this specification to provide
417+
useful functionality.
418+
419+
Worklets are allowed to be used outside <a>SecureContexts</a> as specifications which extend/use
420+
worklets may be allowed to used outside <a>SecureContexts</a>.
421+
422+
Worklets load their module scripts in the same manner that workers load their module scripts. This
423+
fetches the top-level script by the <a>fetch a single module script</a> algorithm which sets the
424+
<a for=request>mode</a> to "<code>cors</code>".
425+
426+
The behaviour of loading scripts can be restricted by using <a>child-src</a> [[CSP]] directive. Each
427+
specification which extends this specification <em>must</em> provide a <a
428+
for=request>destination</a> which is sent along with requests in the <a>Fetch a module worker script
429+
graph</a> algorithm.
430+
431+
Issue(w3c/css-houdini-drafts#378): Provide hook for downstream specifications to provide their
432+
destination type.
433+
434+
The specifications which extend/use worklets may have additional security considerations.
435+
436+
Privacy Considerations {#privacy-considerations}
437+
================================================
438+
439+
There are no known privacy impacts for this feature by itself.
440+
441+
The specifications which extend/use worklets may have privacy considerations.
414442

415443
Examples {#examples}
416444
====================

0 commit comments

Comments
 (0)