Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Remote Debugging - DOM Events not firing
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
t...@yieldmetrics.com  
View profile  
 More options Oct 3 2012, 1:28 am
From: t...@yieldmetrics.com
Date: Tue, 2 Oct 2012 22:28:54 -0700 (PDT)
Local: Wed, Oct 3 2012 1:28 am
Subject: Remote Debugging - DOM Events not firing

My app is communicating with Chrome v22 via the remote debugging websocket
interface.  I have no problem handling events in the Network and Debugger
domains however I can't for the life of me trigger any events to fire in
the DOM domain.

The documentation states, *"It is important that client receives DOM events
only for the nodes that are known to the client."*  Is there a way to
register for these events?  I can retrieve the document just fine
(DOM.getDocument), resolve the document's nodeId to a javascript object,
and then retrieve that object's property list.  Furthermore, I can make
calls to DOM.requestChildNodes with that same nodeId.  But none of this
triggers any of the DOM events to fire (in particular I would expect to see
the DOM.setChildNodes event.)

Any pointers here would be appreciated.

Thanks,
Tom


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pavel Feldman  
View profile  
 More options Oct 3 2012, 2:06 am
From: Pavel Feldman <pfeld...@chromium.org>
Date: Wed, 3 Oct 2012 10:06:50 +0400
Local: Wed, Oct 3 2012 2:06 am
Subject: Re: [Chrome DevTools] Remote Debugging - DOM Events not firing

When you send DOM.getDocument, you get a number of DOM.setChildNodes in
return. They should include the children of the document node (I think we
push nodes 2 levels deep upon getDocument). That's why subsequent calls
to DOM.requestChildNodes(documentNodeId) results in no setChildNodes -
backend remembers that it has been sending those children to you
already. In order to get all the events, you need to traverse entire DOM
and hence become aware of all of the nodes.

But I wonder if you should use DOM domain for your task. DOM domain API is
for visualizing DOM only, that's why it is structured in such an unusual
way. There are other ways of getting that info such as: listening to
Timeline events or registering your own JavaScript listeners using Runtime
domain and emitting signals using console or using some other ways.

Could you share what kind of problem you are solving so that we could help
better?

Regards
Pavel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
t...@yieldmetrics.com  
View profile  
 More options Oct 3 2012, 3:03 am
From: t...@yieldmetrics.com
Date: Wed, 3 Oct 2012 00:03:08 -0700 (PDT)
Local: Wed, Oct 3 2012 3:03 am
Subject: Re: [Chrome DevTools] Remote Debugging - DOM Events not firing

Pavel, thanks for pointing me in the right direction here.  I now have
things working as intended.

For anyone else that comes across this, the documentation isn't
particularly clear.  My mistake was that I was trying to expand only a
subtree of the DOM (discovered via a call to DOM.querySelector) without
expanding the entire DOM starting at the root.

Additionally, a call to DOM.getDocument doesn't actually trigger any
DOM.setChildNodes events but rather returns the children (2 levels deep) in
the immediate response.  But then calls to DOM.requestChildNodes on those
nodes you just got back will in fact trigger the DOM.setChildNodes events
as expected.

Cheers,
Tom


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »