Iframe contentWindow doesn't retain keys

Issue #15425576 • Assigned to Steven K.

Details

Author
Mikhail S.
Created
Jan 11, 2018
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SSP-558</title>
</head>
<body>
<script>
var iframe = document.createElement(“iframe”);
iframe.width = window.outerWidth;
iframe.height = window.outerHeight;
document.body.appendChild(iframe);
iframe.contentWindow[‘key’] = 'HELLO’;
iframe.contentWindow.document.write(‘<body><script>alert(window[“key”]);</script></body>’);
iframe.contentWindow.document.close();
</script>
</body>
</html>

I would expect the above snippet to alert "HELLO", but it doesn’t.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in