<!DOCTYPE html>
<head></head>
<body>
<script>
let newWindow = window.open('about:blank')
newWindow.document.addEventListener('DOMContentLoaded', function() {
console.log('Loaded')
})
</script>
</body>
</html>
<!DOCTYPE html>
<head></head>
<body>
<script>
let newWindow = window.open('about:blank')
newWindow.onload = function() {
console.log('Loaded')
}
</script>
</body>
</html>