Re: [css-houdini-drafts] [worklets] <script> tag import feature design.

> I think it'd be pretty bad to have inline scripts that run in a different global.

Can you explain your reasoning here?

My concern if we don't allow this is that web developers will simply polyfill this themselves, e.g.

```html
<!-- inside the page or web component file -->
<script id="code" type="paintworklet">
  /* some large complex paint worklet code goes here */
</script>
<script>
  const blob = new Blob([document.getElementById('code').textContent]);
  await CSS.paintWorklet.import(URL.createObjectURL(blob));
</script>
```

Which is bad for performance (duplicates a bunch of memory), etc, hence to provide this natively.

-- 
GitHub Notification of comment by bfgeek
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/376#issuecomment-292660515 using your GitHub account

Received on Friday, 7 April 2017 21:50:12 UTC