isolated.html 843 B

12345678910111213141516171819202122232425262728293031
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Isolated World</title>
  6. <script>
  7. window.hello = 'world'
  8. Array.prototype.push = 3
  9. Function.prototype.apply = true
  10. const opened = window.open()
  11. const openedLocation = opened.location
  12. opened.close()
  13. window.postMessage({
  14. openedLocation,
  15. preloadProperty: typeof window.foo,
  16. pageProperty: typeof window.hello,
  17. typeofRequire: typeof require,
  18. typeofProcess: typeof process,
  19. typeofArrayPush: typeof Array.prototype.push,
  20. typeofFunctionApply: typeof Function.prototype.apply,
  21. typeofPreloadExecuteJavaScriptProperty: typeof window.preloadExecuteJavaScriptProperty,
  22. typeofOpenedWindow: typeof opened
  23. }, '*')
  24. </script>
  25. </head>
  26. <body>
  27. </body>
  28. </html>