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

On May 8, 2012, at 5:56 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 5/8/12 8:30 PM, Gregg Tavares (勤) wrote:
>> AFAICT the resize event only fires on window.
> 
> There have been proposals over the years to change that.


CSS Transform and zoom semantics are the steps I still don't catch in my Canvas apps. I will, once I port to web components.


> 
>> 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.
> 
> This seems like a use case for requestAnimationFrame's second argument, and browser quality-of-implementation issues.
> 
>> Does a 'paint' event make sense?
> 
> Possibly, depending on how it's defined; actually running arbitrary script during painting is pretty undesirable (e.g. ideally painting happens on a totally separate thread from script, and having to synchronize them is not particularly ideal).

We've got transition end and rAF. I think we're good on this one.
> 

In fact, might just hook into the transition events with web components.

Received on Wednesday, 9 May 2012 01:16:29 UTC