Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <style> | 3 <style> |
| 4 applet, embed, object { display: block; margin: 10px; } | 4 applet, embed, object { display: block; margin: 10px; } |
| 5 </style> | 5 </style> |
| 6 | 6 |
| 7 <!-- These should all appear as 300x150 green blocks. --> | 7 <!-- These should all appear as 300x150 green blocks. --> |
| 8 <applet code="DoesNotExist.class"></applet> | 8 <applet code="DoesNotExist.class"></applet> |
| 9 <embed type="application/x-fake-plugin"></embed> | 9 <embed type="application/x-fake-plugin"></embed> |
| 10 <object type="application/x-fake-plugin"></object> | 10 <object type="application/x-fake-plugin"></object> |
| 11 | 11 |
| 12 <template id="placeholder-template"> | 12 <template id="placeholder-template"> |
| 13 <style> | 13 <style> |
| 14 :host { overflow: hidden } | 14 :host { overflow: hidden } |
| 15 div { margin: 0; padding: 0; width: 100%; height: 100%; background-color : green; } | 15 div { margin: 0; padding: 0; width: 100%; height: 100%; background-color : green; } |
| 16 </style> | 16 </style> |
| 17 <div></div> | 17 <div></div> |
| 18 </template> | 18 </template> |
| 19 | 19 |
| 20 <script> | 20 <script> |
| 21 internals.settings.setJavaEnabled(true); | |
|
dcheng
2015/08/26 05:27:57
This was apparently not necessary.
| |
| 22 | |
| 23 var templateContent = document.getElementById('placeholder-template').content; | 21 var templateContent = document.getElementById('placeholder-template').content; |
| 24 Array.prototype.forEach.call(document.querySelectorAll("applet, embed, object"), function(plugin) { | 22 Array.prototype.forEach.call(document.querySelectorAll("applet, embed, object"), function(plugin) { |
| 25 internals.forcePluginPlaceholder(plugin, templateContent); | 23 internals.forcePluginPlaceholder(plugin, templateContent); |
| 26 }); | 24 }); |
| 27 </script> | 25 </script> |
| OLD | NEW |