W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: Adding a paint event to HTMLElement to support Web Components / Shadow DOM

From: Charles Pritchard <chuck@jumis.com>
Date: Tue, 8 May 2012 17:53:54 -0700
Message-Id: <514DC331-CF08-415E-8D74-AAD0BC7B0F14@jumis.com>
Cc: Web Applications Working Group WG <public-webapps@w3.org>
To: "Gregg Tavares (勤)" <gman@google.com>
I think we've got request animation frame for the invisible content scenario.

For the height/width/resolution, CSS selectors and SVG are probably the easier case.

Canvas however, that's not so easy.


On May 8, 2012, at 5:30 PM, Gregg Tavares (勤) <gman@google.com> wrote:

> Imagine you want to make a Web Component that draws a graph
> Imagine that you'd like the graph to show more data if it's larger and less if it's smaller. In other words, you don't want it to scale the data.
> Imagine you set that component's size to width: 100%; height: 100% to scale to its container
> Question: How does the Web Component know when to repaint its content?
> AFAICT the resize event only fires on window. If the point of Web Components is to allow people to make self contained components it seems like there might be the need for some way of letting the component know it needs to repaint.
> Resize is just one example. 
> Imagine a relatively heavy to repaint WebComponent like one that draws an representation of an audio wave. If that component is hidden behind some other component it would be nice if it didn't re-draw itself. When it becomes visible thought needs  to know it should redraw itself.
> Does a 'paint' event make sense? 
Received on Wednesday, 9 May 2012 00:54:24 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:40 UTC