Witajcie,
ten kawałek kodu po załadowaniu strony nic nie wyświetla, dlaczego?
window.onload = function() {
alert("Strona została wczytana");
}
Błędy:
ReferenceError: window is not defined
at evalmachine.<anonymous>:2:5
at Script.runInContext (vm.js:74:29)
at Object.runInContext (vm.js:182:6)
at evaluate (/run_dir/repl.js:133:14)
at ReadStream.<anonymous> (/run_dir/repl.js:116:5)
at ReadStream.emit (events.js:180:13)
at addChunk (_stream_readable.js:274:12)
at readableAddChunk (_stream_readable.js:261:11)
at ReadStream.Readable.push (_stream_readable.js:218:10)
at fs.read (fs.js:2124:12)