December 2019
Beginner
464 pages
10h 31m
English
In This Chapter
• Learn about all the events that fire as your page is getting loaded
• Understand what happens behind the scenes during a page load
• Fiddle with the various script element attributes that control exactly when your code runs
An important part of working with JavaScript is ensuring that your code runs at the right time. Things aren’t always as simple as putting your code at the bottom of your page and expecting everything to work once your page has loaded. Yes, we are going to revisit some things we looked at in Chapter 10, “Where Should Your Code Live?” Every now and then, you may have to add some extra code to ensure your code doesn’t run before the page is ready. Sometimes, you may ...