isolated.html 774 B

123456789101112131415161718192021222324252627282930
  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. opened.close()
  12. window.postMessage({
  13. preloadProperty: typeof window.foo,
  14. pageProperty: typeof window.hello,
  15. typeofRequire: typeof require,
  16. typeofProcess: typeof process,
  17. typeofArrayPush: typeof Array.prototype.push,
  18. typeofFunctionApply: typeof Function.prototype.apply,
  19. typeofPreloadExecuteJavaScriptProperty: typeof window.preloadExecuteJavaScriptProperty,
  20. typeofOpenedWindow: typeof opened
  21. }, '*')
  22. </script>
  23. </head>
  24. <body>
  25. </body>
  26. </html>