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