event bubbling

166 views
Skip to first unread message

Dimitris Papageorgiou

unread,
Oct 24, 2013, 4:47:50 PM10/24/13
to google-chrome-...@googlegroups.com
I have set up numerous event/click handlers in my script.
How can Chrome help me pinpoint bubbling phenomena?

Some times alert boxes appear more than 1 time, something which seems it is related to bubbling.

PhistucK

unread,
Oct 24, 2013, 4:59:13 PM10/24/13
to Google Chrome Developer Tools
If you select an element within the Elements panel, I believe the Event handlers pane/tab/drawer shows you all of the listeners, including ones that listen due to bubbling.


PhistucK


--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/18934115-cb01-4066-8ad3-9297f65819e5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dimitris Papageorgiou

unread,
Oct 25, 2013, 8:16:07 AM10/25/13
to google-chrome-...@googlegroups.com
I did what you told me but I cannot see info related to bubbling.
I can find much info but nothing related to bubbling.


Τη Πέμπτη, 24 Οκτωβρίου 2013 11:59:13 μ.μ. UTC+3, ο χρήστης PhistucK έγραψε:
If you select an element within the Elements panel, I believe the Event handlers pane/tab/drawer shows you all of the listeners, including ones that listen due to bubbling.


PhistucK


On Thu, Oct 24, 2013 at 11:47 PM, Dimitris Papageorgiou <foryo...@gmail.com> wrote:
I have set up numerous event/click handlers in my script.
How can Chrome help me pinpoint bubbling phenomena?

Some times alert boxes appear more than 1 time, something which seems it is related to bubbling.

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

Pavel Feldman

unread,
Oct 25, 2013, 8:44:19 AM10/25/13
to Google Chrome Developer Tools
On Fri, Oct 25, 2013 at 4:16 PM, Dimitris Papageorgiou <foryo...@gmail.com> wrote:
I did what you told me but I cannot see info related to bubbling.
I can find much info but nothing related to bubbling.


Listeners used to be sorted in bubbling order there. If that is not the case, please let us know!

Regards
Pavel

To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/513c0fdd-7d8b-4275-aef9-311d6c11265f%40googlegroups.com.

Dimitris Papageorgiou

unread,
Oct 26, 2013, 10:03:43 AM10/26/13
to google-chrome-...@googlegroups.com
You are saying bubbling order...if 2 listeners are listed(such is my case) what listener is listed as first.

And another thing....the listener that is listed second is a parent element of the element where the first listener is listed.
I have not attached any listener to this parent element...nonetheless is is still shown as if though a  click listener has been attached to it. 


Τη Παρασκευή, 25 Οκτωβρίου 2013 3:44:19 μ.μ. UTC+3, ο χρήστης pfeldman έγραψε:
On Fri, Oct 25, 2013 at 4:16 PM, Dimitris Papageorgiou <foryo...@gmail.com> wrote:
I did what you told me but I cannot see info related to bubbling.
I can find much info but nothing related to bubbling.


Listeners used to be sorted in bubbling order there. If that is not the case, please let us know!

Regards
Pavel

Τη Πέμπτη, 24 Οκτωβρίου 2013 11:59:13 μ.μ. UTC+3, ο χρήστης PhistucK έγραψε:
If you select an element within the Elements panel, I believe the Event handlers pane/tab/drawer shows you all of the listeners, including ones that listen due to bubbling.


PhistucK


On Thu, Oct 24, 2013 at 11:47 PM, Dimitris Papageorgiou <foryo...@gmail.com> wrote:
I have set up numerous event/click handlers in my script.
How can Chrome help me pinpoint bubbling phenomena?

Some times alert boxes appear more than 1 time, something which seems it is related to bubbling.

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/18934115-cb01-4066-8ad3-9297f65819e5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.

PhistucK

unread,
Oct 26, 2013, 10:10:37 AM10/26/13
to Google Chrome Developer Tools
Well, if you use a library like jQuery, that library may have attached a listener to the parent element.
The Developer Tools feature does not lie. ;)


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/4d513dd5-6574-4f40-b1c1-f4bb53aa068d%40googlegroups.com.

Dimitris Papageorgiou

unread,
Oct 26, 2013, 1:02:11 PM10/26/13
to google-chrome-...@googlegroups.com
Υes, you are right, I am using jquery and yes jquery seems to  add the listener...although I cannot understand why.
I know the question I am going to make falls out the scope of this scope but is very relevant...do you think I should use stop.eventpropagation at the event handlers of my script


PhistucK


PhistucK

unread,
Oct 26, 2013, 1:08:43 PM10/26/13
to Google Chrome Developer Tools
​jQuery has an unofficial way of exposing the listeners (or you can use the jQuery Debugger​ extension that adds another tab/pane/drawer named "jQuery Events"). Select the parent element within the Elements panel, open the console and enter -
$._data($0, "events").click[0].handler
And the (first) listener function should show up (untested).

And you probably meant event.stopPropagation(); - that will indeed make the event stop bubbling, yes.


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/c65eed54-4e6a-455c-9d39-2111d542936f%40googlegroups.com.

Dimitris Papageorgiou

unread,
Oct 26, 2013, 2:51:31 PM10/26/13
to google-chrome-...@googlegroups.com
The bottom line...do you think event.stopPropagation is necessary?


PhistucK


PhistucK

unread,
Oct 26, 2013, 4:18:03 PM10/26/13
to Google Chrome Developer Tools
Try it and find out? this is off topic from here on.


PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/e388f9f3-55f0-4475-a584-b7993d48599a%40googlegroups.com.

Dimitris Papageorgiou

unread,
Oct 27, 2013, 2:32:09 AM10/27/13
to google-chrome-...@googlegroups.com
Ok...thanks


PhistucK


Reply all
Reply to author
Forward
0 new messages