Handle default parameter of executeJavaScript in C++

This commit is contained in:
Cheng Zhao 2016-01-13 12:17:56 +08:00
parent 55dfddba77
commit 350c572a8c
3 changed files with 6 additions and 7 deletions

View file

@ -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