how to use window onload function in typescript

You are trying to call onload rather than assign an event handler. Windows onload: This window's onload event fires at the start. Why is this sentence from The Great Gatsby grammatical? In the above HTML page source, you can see the