Web Inspector: Provide $event in the console when paused on an event listener
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 19:31:31 +0000 (19:31 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2019 19:31:31 +0000 (19:31 +0000)
commit3ea813c27cdcaf7d34ee6b1519906b33a60452d0
treea704a963cf8871466331c245d60c7e7e47bab85d
parent39ea3b0608f08f92a77178afc5c25c951804f062
Web Inspector: Provide $event in the console when paused on an event listener
https://bugs.webkit.org/show_bug.cgi?id=188672

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScript.h:
* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::setEventValue): Added.
(Inspector::InjectedScript::clearEventValue): Added.

* inspector/InjectedScriptManager.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::clearEventValue): Added.

* inspector/InjectedScriptSource.js:
(WI.InjectedScript.prototype.setEventValue): Added.
(WI.InjectedScript.prototype.clearEventValue): Added.
(BasicCommandLineAPI):

Source/WebCore:

Implement similiar methods/logic as to the way that `$exception` is set.

* inspector/CommandLineAPIModuleSource.js:
(CommandLineAPI):

* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willHandleEvent):
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl):

* inspector/agents/InspectorDOMDebuggerAgent.cpp:
* inspector/agents/InspectorDOMDebuggerAgent.h:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
(WebCore::InspectorDOMDebuggerAgent::didHandleEvent): Added.

Source/WebInspectorUI:

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScript.cpp
Source/JavaScriptCore/inspector/InjectedScript.h
Source/JavaScriptCore/inspector/InjectedScriptManager.cpp
Source/JavaScriptCore/inspector/InjectedScriptManager.h
Source/JavaScriptCore/inspector/InjectedScriptSource.js
Source/WebCore/ChangeLog
Source/WebCore/inspector/CommandLineAPIModuleSource.js
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp
Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js