Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
|
rune
2017/02/28 09:29:05
Drop html and head tags.
| |
| 4 <script> | |
| 5 function makeIframe() { | |
| 6 var iframe = document.getElementById('iframe'); | |
| 7 iframe.contentDocument.body.innerHTML = ` | |
| 8 <style> | |
| 9 .bg-img { | |
| 10 background: url('./resources/green-24x24.png') no-repeat #3D6AA2; | |
|
rune
2017/02/28 09:29:05
Looks like no-repeat or repeat should be enough.
| |
| 11 width: 24px; | |
| 12 height:24px; | |
| 13 } | |
| 14 </style> | |
| 15 <div class='bg-img'></div>`; | |
| 16 } | |
| 17 </script> | |
| 18 </head> | |
| 19 <body onload="makeIframe()"> | |
|
rune
2017/02/28 09:29:06
Do you really need to wait for onload? Can't you s
| |
| 20 <iframe id="iframe"></iframe> | |
| 21 </body> | |
| 22 </html> | |
| OLD | NEW |