OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This module implements Webview (<webview>) as a custom element that wraps a | 5 // This module implements Webview (<webview>) as a custom element that wraps a |
6 // BrowserPlugin object element. The object element is hidden within | 6 // BrowserPlugin object element. The object element is hidden within |
7 // the shadow DOM of the Webview element. | 7 // the shadow DOM of the Webview element. |
8 | 8 |
9 var DocumentNatives = requireNative('document_natives'); | 9 var DocumentNatives = requireNative('document_natives'); |
10 var EventBindings = require('event_bindings'); | 10 var EventBindings = require('event_bindings'); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
308 if (!this.instanceId) { | 308 if (!this.instanceId) { |
309 throw new Error(ERROR_MSG_CANNOT_INJECT_SCRIPT); | 309 throw new Error(ERROR_MSG_CANNOT_INJECT_SCRIPT); |
310 } | 310 } |
311 }; | 311 }; |
312 | 312 |
313 /** | 313 /** |
314 * @private | 314 * @private |
315 */ | 315 */ |
316 WebViewInternal.prototype.executeScript = function(var_args) { | 316 WebViewInternal.prototype.executeScript = function(var_args) { |
317 this.validateExecuteCodeCall(); | 317 this.validateExecuteCodeCall(); |
318 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); | 318 var args = $Array.concat([this.instanceId], |
Fady Samuel
2014/04/04 19:35:05
[this.instanceId, this.src] instead.
Xi Han
2014/04/06 20:14:03
Done.
| |
319 [this.src], | |
320 $Array.slice(arguments)); | |
319 $Function.apply(WebView.executeScript, null, args); | 321 $Function.apply(WebView.executeScript, null, args); |
320 }; | 322 }; |
321 | 323 |
322 /** | 324 /** |
323 * @private | 325 * @private |
324 */ | 326 */ |
325 WebViewInternal.prototype.insertCSS = function(var_args) { | 327 WebViewInternal.prototype.insertCSS = function(var_args) { |
326 this.validateExecuteCodeCall(); | 328 this.validateExecuteCodeCall(); |
327 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); | 329 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); |
328 $Function.apply(WebView.insertCSS, null, args); | 330 $Function.apply(WebView.insertCSS, null, args); |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1177 | 1179 |
1178 /** | 1180 /** |
1179 * Implemented when the experimental API is available. | 1181 * Implemented when the experimental API is available. |
1180 * @private | 1182 * @private |
1181 */ | 1183 */ |
1182 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; | 1184 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; |
1183 | 1185 |
1184 exports.WebView = WebView; | 1186 exports.WebView = WebView; |
1185 exports.WebViewInternal = WebViewInternal; | 1187 exports.WebViewInternal = WebViewInternal; |
1186 exports.CreateEvent = CreateEvent; | 1188 exports.CreateEvent = CreateEvent; |
OLD | NEW |