Skip to content

Instantly share code, notes, and snippets.

@kamituel
Created February 12, 2016 09:08
Show Gist options
  • Save kamituel/a15411d5536cfe04156a to your computer and use it in GitHub Desktop.
Save kamituel/a15411d5536cfe04156a to your computer and use it in GitHub Desktop.
Window opener in Safari
<html>
<head>
<script>
window.openPopup = function() {
window.open('popup.html', 'popup', 'height=200,width=200');
return false;
};
</script>
</head>
<body>
<button onclick='openPopup()'>open!</button>
</body>
</html>
<html>
<head>
<script>
window.doToParent = function() {
window.opener.location.href = "url";
};
</script>
</head>
<body>
<button onclick='doToParent()'>do to parent</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment