mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Check whether devtools is opened when executing js code
Fixes atom/electron#2808.
This commit is contained in:
@@ -281,6 +281,9 @@ void InspectableWebContentsImpl::CallClientFunction(const std::string& function_
|
||||
const base::Value* arg1,
|
||||
const base::Value* arg2,
|
||||
const base::Value* arg3) {
|
||||
if (!devtools_web_contents_)
|
||||
return;
|
||||
|
||||
std::string javascript = function_name + "(";
|
||||
if (arg1) {
|
||||
std::string json;
|
||||
|
||||
Reference in New Issue
Block a user