The event DOMNodeInsertedIntoDocument doesn't occur

167 views
Skip to first unread message

Yao Ziyuan

unread,
Apr 15, 2012, 10:07:06 AM4/15/12
to Chromium HTML5
The event DOMNodeInsertedIntoDocument doesn't occur on https://plus.google.com/s/is,
but DOMNodeInserted does. why?

Yao Ziyuan

unread,
Apr 15, 2012, 10:18:53 AM4/15/12
to Chromium HTML5
This reference seems to suggest why:
http://books.google.com/books?id=KW9G9rdlStIC&pg=PT357&lpg=PT357&dq=DOMNodeInsertedIntoDocument+chrome&source=bl&ots=4WUTRKVYQu&sig=gXZAvTF0R8sP_QjGQE-dMtXUvjE&hl=en&sa=X&ei=TMGKT4yoJOeaiQeK5L3FCQ&ved=0CEkQ6AEwAw#v=onepage&q=DOMNodeInsertedIntoDocument%20chrome&f=false

It says NodeInsertedIntoDocument doesn't bubble, so I can't listen to
this event from document.body.

On Apr 15, 10:07 pm, Yao Ziyuan <yaoziy...@gmail.com> wrote:
> The event DOMNodeInsertedIntoDocument doesn't occur onhttps://plus.google.com/s/is,
> but DOMNodeInserted does. why?

Paul Irish

unread,
Apr 15, 2012, 2:29:24 PM4/15/12
to Yao Ziyuan, Chromium HTML5
Yup, the bubbling detail seems accurate. 

You might want to also investigate Mutation Observers, available in Chrome, which will allow you to watch this behavior in a much more performant manner.




--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To post to this group, send email to chromiu...@chromium.org.
To unsubscribe from this group, send email to chromium-html...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/?hl=en.

Yao Ziyuan

unread,
Apr 15, 2012, 2:39:58 PM4/15/12
to Chromium HTML5


On Apr 16, 2:29 am, Paul Irish <paulir...@google.com> wrote:
> Yup, the bubbling detail seems accurate.
>
> You might want to also investigate Mutation Observers, available in Chrome,
> which will allow you to watch this behavior in a much more performant
> manner.

I did, but found MutationSummary unable to capture new/updated text on
https://plus.google.com/u/0/s/is . Details here:
http://groups.google.com/a/chromium.org/group/chromium-extensions/browse_frm/thread/3cdfac556000cd49/5f024256b9906154#5f024256b9906154

>
> http://updates.html5rocks.com/2012/02/Detect-DOM-changes-with-Mutatio...
>
> On Sun Apr 15 07:18:53 GMT-700 2012, Yao Ziyuan <yaoziy...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > This reference seems to suggest why:
>
> >http://books.google.com/books?id=KW9G9rdlStIC&pg=PT357&lpg=PT357&dq=D...
>
> > It says NodeInsertedIntoDocument doesn't bubble, so I can't listen to
> > this event from document.body.
>
> > On Apr 15, 10:07 pm, Yao Ziyuan <yaoziy...@gmail.com> wrote:
> > > The event DOMNodeInsertedIntoDocument doesn't occur onhttps://
> > plus.google.com/s/is,
>
> > > but DOMNodeInserted does. why?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Chromium HTML5" group.
> > To post to this group, send email to chromium-ht...@chromium.org.
> > To unsubscribe from this group, send email to
> > chromium-html5+unsubscr...@chromium.org.

Yao Ziyuan

unread,
Apr 15, 2012, 3:30:26 PM4/15/12
to Chromium HTML5
Oh, now I know why my code doesn't work...

On Apr 16, 2:39 am, Yao Ziyuan <yaoziy...@gmail.com> wrote:
> On Apr 16, 2:29 am, Paul Irish <paulir...@google.com> wrote:
>
> > Yup, the bubbling detail seems accurate.
>
> > You might want to also investigate Mutation Observers, available in Chrome,
> > which will allow you to watch this behavior in a much more performant
> > manner.
>
> I did, but found MutationSummary unable to capture new/updated text onhttps://plus.google.com/u/0/s/is. Details here:http://groups.google.com/a/chromium.org/group/chromium-extensions/bro...
Reply all
Reply to author
Forward
0 new messages