Handle default parameter of executeJavaScript in C++
This commit is contained in:
parent
55dfddba77
commit
350c572a8c
3 changed files with 6 additions and 7 deletions
|
@ -100,10 +100,6 @@ wrapWebContents = function(webContents) {
|
|||
// webContents has been loaded.
|
||||
const executeJavaScript = webContents.executeJavaScript;
|
||||
webContents.executeJavaScript = function(code, hasUserGesture) {
|
||||
// TODO(zcbenz): Use default parameter after Chrome 49.
|
||||
if (hasUserGesture === undefined)
|
||||
hasUserGesture = false;
|
||||
|
||||
if (this.getURL() && !this.isLoading())
|
||||
return executeJavaScript.call(this, code, hasUserGesture);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue