W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] Feedback on Web Worker specification

From: Fred Andrews <fredandw@live.com>
Date: Fri, 23 Nov 2012 11:25:05 +0000
Message-ID: <BLU002-W200BEF45CC8474FBCDD0C7CAA5A0@phx.gbl>
To: Elliott Sprehn <esprehn@chromium.org>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>

> From: fredandw@live.com
...
> Thank you for the suggestion.  Using the <script> element seems like a good
> approach to explore.
> 
> Overloading the 'type' attribute could be problematic because the script type
> may well be orthogonal to the JS context to which the script applies.  Could I
> suggest a new attribute, for example 'context' that declares the script context.

Just to follow up.  Perhaps I understand now why you suggested a different
'type' - so that the script is not interpreted as javascript by legacy browsers.

It would not seem appropriate for a legacy browser to load script intended
for a worker into the document JS context.  While it might be possible to
write code that works in both contexts, it would seem too much of a burden
on the programmer.

So it would seem that overloading the script element 'type' attribute would be
a possible solution if it were really necessary to support inline script for workers.
If it were not necessary to supporting inline script then a 'meta' or 'link' element
might be more appropriate declarative markup for starting workers.

cheers
Fred


 		 	   		  
Received on Friday, 23 November 2012 13:53:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT