Bug 19879

Summary: Inspector should support monitorEvents/un monitorEvents() in the command line
Product: WebKit Reporter: Keishi Hattori <keishi>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: aroben, commit-queue, rik, timothy
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 30324    
Bug Blocks: 14355    
Attachments:
Description Flags
proposed patch
pfeldman: review-
proposed patch 2 none

Keishi Hattori
Reported 2008-07-03 06:58:29 PDT
Inspector should support monitorEvents/un monitorEvents() in the command line for Firebug parity.
Attachments
proposed patch (4.20 KB, patch)
2009-10-12 23:55 PDT, Keishi Hattori
pfeldman: review-
proposed patch 2 (4.37 KB, patch)
2009-10-20 20:30 PDT, Keishi Hattori
no flags
Adam Roben (:aroben)
Comment 1 2008-07-11 14:08:51 PDT
Keishi Hattori
Comment 2 2009-10-12 23:55:02 PDT
Created attachment 41089 [details] proposed patch Consecutive events are not shown because of bug #30324 https://bugs.webkit.org/show_bug.cgi?id=30324 Usage: monitorEvent(el) will log all events to el monitorEvent(el, "click") will log "click" events monitorEvent(el, ["keydown", "keyup"]) will log "keyup" and "keydown" events monitorEvent(el, "mouse") will log all mouse related events monitorEvent(el, "key") will log all key related events unmonitorEvent(el) will turn off logging for all events
Pavel Feldman
Comment 3 2009-10-20 15:39:18 PDT
Comment on attachment 41089 [details] proposed patch > + if (t[i] == \"mouse\") \ Use === > + te = te.concat([\"mousedown\", \"mouseup\", \"click\", \"dblclick\", \ Use splice instead in order not to create new array instances. > + if (t[i] == \"key\") \ Use === > + o.removeEventListener Should you test for addEventListener / removeEvent listener on an object? Does monitorEvent(null) provide meaningful feedback well? Other than that r+.
Keishi Hattori
Comment 4 2009-10-20 20:30:07 PDT
Created attachment 41545 [details] proposed patch 2 (In reply to comment #3) > > + if (t[i] == \"mouse\") \ Fixed. > > + te = te.concat([\"mousedown\", \"mouseup\", \"click\", \"dblclick\", \ Fixed. > > + if (t[i] == \"key\") \ Fixed. > Should you test for addEventListener / removeEvent listener on an object? Added tests. > Does monitorEvent(null) provide meaningful feedback well? I wasn't sure what to do. Should it print usage help or an error?
Pavel Feldman
Comment 5 2009-10-22 07:29:18 PDT
Comment on attachment 41545 [details] proposed patch 2 FYI: we are currently working on TimelineAgent that is getting information from the instrumentation all over WebCore. Including the events. So it is already getting all the data you are collecting here. It is not bound to any particular object though, so it is a bit different, but still close!
WebKit Commit Bot
Comment 6 2009-10-22 08:45:55 PDT
Comment on attachment 41545 [details] proposed patch 2 Clearing flags on attachment: 41545 Committed r49940: <http://trac.webkit.org/changeset/49940>
WebKit Commit Bot
Comment 7 2009-10-22 08:45:58 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.