Chapter 12. Working the DOM
This chapter covers
- Inserting HTML into the DOM
- Understanding DOM attributes and DOM properties
- Discovering computed styles
- Dealing with layout thrashing
Up to now, you’ve been learning mostly about JavaScript the language, and although there are plenty of nuances to pure JavaScript, developing web applications definitely doesn’t get any easier when we throw the browser’s Document Object Model (DOM) into the mix. One of the primary means for achieving highly dynamic web applications that respond to user actions is by modifying the DOM. But if we were to open up a JavaScript library, you’d notice the length and complexity of the code behind simple DOM operations. Even presumably simple operations like cloneNode
Get Secrets of the JavaScript Ninja, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.