[css-houdini-drafts] [worklets] Review

domenic has just created a new issue for https://github.com/w3c/css-houdini-drafts:

== [worklets] Review ==
This is an overdue review of the latest changes, e.g. #375 and #381. I decided to just do a read-through of the algorithm portions of the spec, instead of those particularly. I've bolded the significant issues; most are minor.

- "Do not obtain any source texts for scripts or modules." is no longer necessary
- **"set up a worklet environment settings object" seems to inherit way too much:**
  - The API base URL is inherited from the HTML page? Meaning that URL resolution inside a worklet script created via `CSS.paintWorklet.loadModule("foo/bar.js")` should be relative to `index.html`, not relative to `foo/bar.js`?
  - The referrer policy ignores any HTTP headers for the worklet scripts, but instead just uses whatever the HTML page does?
  - The HTTPS state is copied from the document? So if I import a worklet over an insecure transport, it still counts as secure, as long as the hosting page uses HTTPS?
- Technically the id and creation URL for environment settings objects are fields, not algorithms, and so listing them separately might be better.
- Typo "consiting"
- In general we don't italicize "null"
- loadModule():
  - "the current Worklet" -> "this Worklet"
  - "SyntaxError" DOMException and other similar spec text should be using `"{{SyntaxError}}" {{DOMException}}` markup so it gets code-ified
  - Step 7 which establishes outsideSettings could move earlier, which would make step 3 which does URL parsing shorter
  - **"Run a module script" will try to report the exception, but WorkletGlobalScope doesn't have an onerror event handler**. Probably it should.
  - Great task-queuing discipline.


Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/396 using your GitHub account

Received on Monday, 24 April 2017 20:36:11 UTC