Skip to content

Instantly share code, notes, and snippets.

@craigerskine
Created June 2, 2022 12:12
Show Gist options
  • Save craigerskine/10193f5f6cc9fba674fa86cea903b5b2 to your computer and use it in GitHub Desktop.
Save craigerskine/10193f5f6cc9fba674fa86cea903b5b2 to your computer and use it in GitHub Desktop.
Accessible popup
<a
href="file.html"
onclick="
window.open(this.href,
'_blank',
'width=640,height=480,top=100,left=100,titlebar=no,toolbar=no,location=no,menubar=no,status=no,scrollbars=yes,resizable=yes');
return false;
"
>
Safe Popup
</a>
methods: {
// safe popup - pop(string)
pop: function(url) {
event.preventDefault();
window.open(url, '_blank', 'width=640,height=480,top=100,left=100,titlebar=no,toolbar=no,location=no,menubar=no,status=no,scrollbars=yes,resizable=yes');
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment