Re: [whatwg] Feedback on Web Worker specification

On Tue, Nov 20, 2012 at 6:30 PM, Ian Hickson <ian@hixie.ch> wrote:

> ...
> On Sat, 3 Nov 2012, Fred Andrews wrote:
> >
> > Feedback and suggestions for appropriate markup to declare web workers
> > would be appreciated.
>
> Workers are only usable from script, so just start them in script. No need
> for anything declarative.
>

This has come up a couple times with developers and I think being able to
do:

<script type="worker" id="taskQueue">
  ...
</script>

and then being able to access the worker to post message it by id would be
extremely useful.

document.getElementById('taskQueue').worker.postMessage(...);

Forcing the code into a separate file or requiring a data URL is annoying.

- E

Received on Wednesday, 21 November 2012 05:03:23 UTC