RESOLVED FIXED 50138
Web Inspector: $x: any node should work in optional context parameter.
https://bugs.webkit.org/show_bug.cgi?id=50138
Summary Web Inspector: $x: any node should work in optional context parameter.
Yonathan Randolph
Reported 2010-11-28 22:40:17 PST
Created attachment 74987 [details] patch for the $x function. The optional context parameter of the $x function currently has to be a document, but it should allow any node. Note: Firebug's $x doesn't have the context parameter at all. Example invocation: $x('body', document.documentElement)
Attachments
patch for the $x function. (781 bytes, patch)
2010-11-28 22:40 PST, Yonathan Randolph
no flags
Patch to $x function including ChangeLog. (1.32 KB, patch)
2010-12-01 13:56 PST, Yonathan Randolph
pfeldman: review+
Alexander Pavlov (apavlov)
Comment 1 2010-11-29 01:53:21 PST
Comment on attachment 74987 [details] patch for the $x function. This change lacks at least a ChangeLog entry. Please see http://webkit.org/coding/contributing.html for contributing guidelines. I'm not a reviewer to r- the change, though.
Pavel Feldman
Comment 2 2010-11-29 13:30:55 PST
This change looks good. Please include WebCore/ChangeLog entry pointing to this bug (see other entries for reference) and I'll be able to r+ it. Thanks for the patch!
Yonathan Randolph
Comment 3 2010-12-01 13:56:35 PST
Created attachment 75319 [details] Patch to $x function including ChangeLog.
Yonathan Randolph
Comment 4 2010-12-01 13:59:29 PST
Sorry it took so long to get the patch with ChangeLog. I recompiled and tried to make a unit test but apparently $x isn't available in injection tests (at least with --use-drt).
Pavel Feldman
Comment 5 2011-02-08 05:30:52 PST
Comment on attachment 75319 [details] Patch to $x function including ChangeLog. I'll rebase and land.
Pavel Feldman
Comment 6 2011-02-08 07:35:53 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ... M Source/WebCore/ChangeLog M Source/WebCore/inspector/InjectedScriptSource.js Committed r77931
Pavel Feldman
Comment 7 2011-02-08 07:38:21 PST
I accidentally generated changelog entry with my name, will fix it in the next commit.
Note You need to log in before you can comment on or make changes to this bug.