W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] Fwd: Using Web Workers without external files

From: Marius Gundersen <gundersen@gmail.com>
Date: Thu, 24 Sep 2009 12:37:10 +1000
Message-ID: <45f4181c0909231937s7aea18e7n617571ad2e1d5f37@mail.gmail.com>
---------- Forwarded message ----------
From: Marius Gundersen <gundersen@gmail.com>
Date: Thu, Sep 24, 2009 at 11:20 AM
Subject: Re: [whatwg] Using Web Workers without external files
To: Michael Nordman <michaeln at google.com>


What about a javascript: url, like the addressbar and links already accept?
for example:
<!DOCTYPE html>
<html>
<head><title>example</title>
<script>
str = "<script to evaluate>";
w = new Worker("javascript:onmessage = function(a){postMessage(a*a)}");
w.postMessage(str);
</script>
</html>


On Thu, Sep 24, 2009 at 11:03 AM, Michael Nordman <michaeln at google.com>wrote:

> Data urls seem like a real good fit for dedicated workers.
>
>
> On Wed, Sep 23, 2009 at 5:35 PM, Jonas Sicking <jonas at sicking.cc> wrote:
>
>> On Wed, Sep 23, 2009 at 2:51 PM, Tab Atkins Jr. <jackalmage at gmail.com>
>> wrote:
>> > On Wed, Sep 23, 2009 at 4:40 PM, Jonas Sicking <jonas at sicking.cc>
>> wrote:
>> >> I think making data: urls is an ok solution,
>> >
>> > At the moment, data: urls don't seem to be usable with Workers due to
>> > same-origin restrictions; canvas methods get to special-case data: to
>> > not be treated as different-origin (and thus dirty themselves), but
>> > there doesn't appear to be a similar relaxation of the origin rules
>> > for data: urls in script.
>>
>> I know, I'm saying that we should relax that.
>>
>> / Jonas
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090924/07f8eba5/attachment.htm>
Received on Wednesday, 23 September 2009 19:37:10 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC