Skip to content

Instantly share code, notes, and snippets.

@wanderview
Created October 26, 2017 13:02
Show Gist options
  • Save wanderview/b819e4c5357909e6ab40121d421960a0 to your computer and use it in GitHub Desktop.
Save wanderview/b819e4c5357909e6ab40121d421960a0 to your computer and use it in GitHub Desktop.
Common about:blank replacement case
<!DOCTYPE html>
<html>
<script>
// self.bar === 'foobar'
</script>
</html>
<!DOCTYPE html>
<html>
<body>
<iframe id="foo" src="frame.html"></iframe>
<script>
let frame = document.getElementById('foo');
frame.contentWindow.bar = 'foobar';
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment