You probably saw that on some sites (if you use browser autofill) the login/password fields dont get autofilled immediately, but theres a delay till the page fully loads. Specifies the height of the content area, including scrollbars. you write "In general, however, I'd avoid assigning functions directly to onload in favour of using addEventListener" <-- why? If an empty string ("") is specified or this parameter is omitted, a blank page is opened into the targeted browsing context. If we want to cancel the transition to another page, we cant do it here. This blog post explains how to use cy.window () to spy on the DOM prototype to detect when the application starts adding event listeners to the DOM elements. What does "use strict" do in JavaScript, and what is the reasoning behind it? So if DOMContentLoaded is postponed by long-loading scripts, then autofill also awaits. Visual Studio Code. While using W3Schools, you agree to have read and accepted our, , ,