The question is simple: why doesn't my console show a result based on the code below? There is no message 'Loaded' in the console after this code has been executed... Seems like 'onload' has interaction problems with 'about:blank' window. Maybe 'about:blank' has permanent 'readyState' property which always describes 'complete'?
P.S. Tested it only in Google Chrome.
<!DOCTYPE html>
<head></head>
<body>
<script>
let newWindow = window.open('about:blank')
newWindow.onload = function() {
console.log('Loaded')
}
</script>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire