Re: [whatwg] Counterproposal for canvas in workers

On Fri, Oct 18, 2013 at 6:50 AM, Rik Cabanier <cabanier@gmail.com> wrote:

> Extra methods on the canvas API:
>
> Promise setTaskScript(DOMString script); // can error be in promise?
> Promise executeTask(DOMString id, dictionary json, boolean synchronized =
> true); // Transferable elements allowed in dictionary
>
> Object that is active in the task:
>
> interface CanvasTask {
>
> HTMLCanvasElement createCanvas(unsigned long width, unsigned long height);
> attribute Function onTask;
>
> }
>
> CanvasTask implements HTMLCanvasElement;
>

It looks like you intend CanvasTask to be the global object for the task
script? So it's not a Worker and you don't get anything from
WorkerGlobalScope? That's extremely limiting and also adds a lot of
complexity by introducing a new kind of script global. You really would
want to reuse workers here.

Also, making the HTMLCanvasElement API accessible from non-main threads is
a big no-no. You can't let people do CanvasTask.document.window.whatever
from non-main threads.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*

Received on Sunday, 20 October 2013 07:29:14 UTC