Re: [custom-elements] Invoking lifecycle callbacks before invoking author scripts

Can you give a code example of how this happens?
On Feb 24, 2016 8:30 PM, "Ryosuke Niwa" <rniwa@apple.com> wrote:

>
> > On Feb 23, 2016, at 1:16 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> >
> > On Tue, Feb 23, 2016 at 5:26 AM, Ryosuke Niwa <rniwa@apple.com> wrote:
> >> Hi,
> >>
> >> We propose to change the lifecycle callback to be fired both before
> invoking author scripts (e.g. for dispatching events) and before returning
> to author scripts.
> >>
> >> Without this change, event listeners that call custom elements' methods
> would end up seeing inconsistent states during compound DOM operation such
> as Range.extractContents and editing operations, and we would like to avoid
> that as much as possible.
> >
> > These are the events we wanted to try and delay to dispatch around the
> > same time lifecycle callbacks are supposed to be called?
>
> Yeah, I'm talking about focus, unload, etc... and DOM mutation events.
> It's possible that we can make all those event async in the future but
> that's not the current state of the world, and we would like to keep the
> custom elements' states consistent for authors.
>
> - R. Niwa
>
>
>

Received on Thursday, 25 February 2016 05:06:37 UTC