| <!DOCTYPE html> |
| <html> |
| <body> |
| <div id="console">Waiting...</div> |
| <button id="btn1">Step 1</button> |
| <script id="isolatedScript" type="isolated/world"> |
| document.body.world = 'Isolated'; |
| var bt = document.getElementById('btn1'); |
| bt.addEventListener('click', function() { |
| document.getElementById('console').innerHTML = document.body.world; |
| }, false); |
| bt.click(); |
| </script> |
| <script> |
| document.body.world = 'Main'; |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.evaluateScriptInIsolatedWorld(0, document.getElementById('isolatedScript').innerHTML); |
| } |
| </script> |
| </body> |
| </html> |