Onload event handler not working in codesandbox

Hi campers,

I am testing something small on codesandbox but my onload event handler is not working. I don’t know exactly what i am missing. click event handler fires but not load event handler on the window object. The sandbox is Here.

You’re right, I guess if you need to run a function after that’s done, for now, use something like this:

setTimeout(console.log(“Page is fully loaded 1”), 100)

And instead of console log, run:

function myf(){
console.log("Page is fully loaded 1")
//stuff
}

Not much help, good luck though.