Re: [css-regions] Fwd: Scheduling multiple types of end-of-(micro)task work

On Thu, Nov 15, 2012 at 9:51 AM, Andrei Bucur <abucur@adobe.com> wrote:
> I have given some thoughts to the regionlayoutupdate event - what condition triggers it and when it should be dispatched.
> For the current version of the spec I think it is sufficient to consider the event is triggered only by changes of the overset value of the NamedFlow (so it could be renamed to flowoversetchanged). This covers most of the use-cases I can think of. In my opinion, having something more generic brings a lot of complexity without much value. We could discuss more about how regionlayoutupdate can be extended when there will be strong use cases that need a more powerful event (e.g. to detect subtle layout changes).
> The timing of the event is a bit tricky to get right. The overset value of the NamedFlow object is a result of the layout (see the discussion in the original thread). As a consequence there aren't many options to pick from. I'm imagining something like this:
> 1. The event needs to be synchronous to allow scripts to update the layout in a responsive manner by interleaving with other events that cause a layout change.
> 2. I think the event must be dispatched on the same task queue of the "resize" event. The reason is to allow smooth updates of the layout when the user resizes the browser window.

Synchronous events are, in general, the devil, and shouldn't be used
unless there's a *very* good reason they have to be, and a thorough
review has been done of the implications.

~TJ

Received on Thursday, 15 November 2012 18:16:32 UTC