TypeScript
by Sascha
HTML
<div id="app"></div>
CSS
body {
background: #20262E;
padding: 20px;
font-family: Helvetica;
}
#app {
background: #fff;
border-radius: 4px;
padding: 20px;
transition: all 0.2s;
text-align: center;
}
TypeScript
const popup = window.open('', 'popup', "toolbar=no,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400");
alert('open');
// in this case we can lock the screen
if (popup) {
popup.addEventListener('unload', (ev: Event) => {
alert(ev);
console.log(ev.srcElement.cookie);
});
}