- From: Charles McCathieNevile <chaals@opera.com>
- Date: Mon, 06 Feb 2012 09:27:53 +0100
- To: "Benjamin Hawkes-Lewis" <bhawkeslewis@googlemail.com>, "Charles Pritchard" <chuck@jumis.com>
- Cc: "Frank Olivier" <Frank.Olivier@microsoft.com>, "Richard Schwerdtfeger" <schwer@us.ibm.com>, "Steve Faulkner" <faulkner.steve@gmail.com>, "Cynthia Shelly" <cyns@microsoft.com>, "david bolter" <david.bolter@gmail.com>, "David Bolter" <dbolter@mozilla.com>, "Jonas Sicking" <jonas@sicking.cc>, "Maciej Stachowiak" <mjs@apple.com>, "Paul Cotton" <Paul.Cotton@microsoft.com>, "public-canvas-api@w3.org" <public-canvas-api@w3.org>, "public-html@w3.org" <public-html@w3.org>, "public-html-a11y@w3.org" <public-html-a11y@w3.org>, "Sam Ruby" <rubys@intertwingly.net>
On Thu, 02 Feb 2012 19:36:03 +0100, Charles Pritchard <chuck@jumis.com> wrote: >> On Thu, Feb 2, 2012 at 1:35 AM, Charles Pritchard<chuck@jumis.com> >> wrote: >>> As for the relatedTarget, I don't know that it's necessary to include >>> it. >>> The author already knows which canvas they used when they bound to the >>> sub-element. >> How do they know that? > > When they wire up the event handlers, they have specific data at hand. > If it's absolutely necessary, they can setup an object to help them > track it. > > var myObj = {}; > ctx.setElementPath(myObj[ctx.canvas.id] = subElement); > > Again, though, you have items like onclick, where it's plausible that > the click was triggered by keyboard. > >> What happens if different canvas paths, perhaps in different canvases, >> are bound to the same element? >> > > The latest canvas to bind wins the prize. > I don't think the DOM+CSS model is ready to handle multiple boxes > pointing to one element. But web page design is well past ready for that, and there are lots of ways to do it... > This binding is really more about CSS and the browser's internal > implementation of a light shadow dom than it is about canvas. > It's the DOM we're updating. The canvas implementation should not be > keeping track of things. It's the DOM+CSS implementation that should be > doing the work. Agreed. But we should design for reality not theory, and my sense tells me that far too many people *do* use the canvas to keep track of what is happening instead of a nice clean architecture... > DOM does support multiple rectangles in getClientRects, I don't think > it's something we need to aspire to. > If an author has several paths, they can easily run them before a single > binding call. cheers Chaals -- Charles 'chaals' McCathieNevile Opera Software, Standards Group je parle français -- hablo español -- jeg kan litt norsk http://my.opera.com/chaals Try Opera: http://www.opera.com
Received on Monday, 6 February 2012 08:28:57 UTC