Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: Source/core/inspector/InjectedScript.cpp

Issue 1042853004: [DevTools] Event Listeners Sidebar shows window listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Extracted eventListenersTreeOutline.css Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InjectedScript.h ('k') | Source/core/inspector/InjectedScriptHost.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScript.cpp
diff --git a/Source/core/inspector/InjectedScript.cpp b/Source/core/inspector/InjectedScript.cpp
index d3191984f52a56d211456af04daf61352165009c..c90a71155493e3e395e3b8eb0399f3a20cf3ad8e 100644
--- a/Source/core/inspector/InjectedScript.cpp
+++ b/Source/core/inspector/InjectedScript.cpp
@@ -257,6 +257,13 @@ Node* InjectedScript::nodeForObjectId(const String& objectId)
return InjectedScriptHost::scriptValueAsNode(scriptState(), resultValue);
}
+EventTarget* InjectedScript::eventTargetForObjectId(const String& objectId)
+{
+ if (isEmpty() || !canAccessInspectedWindow())
+ return nullptr;
+ return InjectedScriptHost::scriptValueAsEventTarget(scriptState(), findObjectById(objectId));
+}
+
void InjectedScript::releaseObject(const String& objectId)
{
RefPtr<JSONValue> parsedObjectId = parseJSON(objectId);
« no previous file with comments | « Source/core/inspector/InjectedScript.h ('k') | Source/core/inspector/InjectedScriptHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698