Chromium Code Reviews| Index: remoting/webapp/remoting.js |
| diff --git a/remoting/webapp/remoting.js b/remoting/webapp/remoting.js |
| index adc26a7630eb5b8682db100b57cecfd97c906ae9..52357f7422128ea0c95e1239eafc0dc2fc9f73a9 100644 |
| --- a/remoting/webapp/remoting.js |
| +++ b/remoting/webapp/remoting.js |
| @@ -190,15 +190,14 @@ remoting.createNpapiPlugin = function(container) { |
| // Hiding the plugin means it doesn't load, so make it size zero instead. |
| plugin.width = 0; |
| plugin.height = 0; |
| - container.appendChild(plugin); |
| // Verify if the plugin was loaded successfully. |
| - if (!plugin.hasOwnProperty('REQUESTED_ACCESS_CODE')) { |
| - container.removeChild(plugin); |
| - return null; |
| + if (plugin.hasOwnProperty('REQUESTED_ACCESS_CODE')) { |
|
Sergey Ulanov
2014/05/24 01:50:34
Plugins are not loaded until they are added to DOM
|
| + container.appendChild(plugin); |
| + return /** @type {remoting.HostPlugin} */ (plugin); |
| } |
| - return /** @type {remoting.HostPlugin} */ (plugin); |
| + return null; |
| }; |
| /** |