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

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 226043005: Fix webview.executeScript API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update InsertCss API. Created 6 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
Index: chrome/renderer/resources/extensions/web_view.js
diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
index c85bb67e7cf6f40332f8916273a063a5f4fe74fd..ce75619c6b63abf57864381fd4774050d1137b22 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -315,7 +315,8 @@ WebViewInternal.prototype.validateExecuteCodeCall = function() {
*/
WebViewInternal.prototype.executeScript = function(var_args) {
this.validateExecuteCodeCall();
- var args = $Array.concat([this.instanceId], $Array.slice(arguments));
+ var args = $Array.concat([this.instanceId, this.src],
+ $Array.slice(arguments));
$Function.apply(WebView.executeScript, null, args);
};
@@ -324,7 +325,8 @@ WebViewInternal.prototype.executeScript = function(var_args) {
*/
WebViewInternal.prototype.insertCSS = function(var_args) {
this.validateExecuteCodeCall();
- var args = $Array.concat([this.instanceId], $Array.slice(arguments));
+ var args = $Array.concat([this.instanceId, this.src],
+ $Array.slice(arguments));
$Function.apply(WebView.insertCSS, null, args);
};
« no previous file with comments | « chrome/renderer/extensions/user_script_scheduler.cc ('k') | chrome/test/data/extensions/platform_apps/web_view/shim/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698