W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2014

Re: [whatwg] hit regions: moving an element out of the shadow tree

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 8 Feb 2014 16:55:31 +0000 (UTC)
To: Rik Cabanier <cabanier@gmail.com>
Message-ID: <alpine.DEB.2.00.1402081651410.30855@ps20323.dreamhostps.com>
Cc: "whatwg@whatwg.org" <whatwg@whatwg.org>
On Fri, 7 Feb 2014, Rik Cabanier wrote:
>
> Another question: it is currently valid to pass in a control that is not 
> part of the canvas shadow tree. Doing this will ignore the control. 
> Shouldn't this be invalid and throw an error?

APIs don't really have a concept of "valid" or "invalid".

It doesn't throw, because the control might have just been created and the 
author might have painted it before adding it to the canvas. It'll work 
once the control is a descendant of the canvas. You can use this to 
temporarily stop events being propagated, while keeping the region around.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 8 February 2014 16:56:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:16 UTC