Module 05: Browser and DOM¶
Interacting with web pages from JavaScript: the DOM API, event handling, the Fetch API, web storage, and browser-specific APIs.
This module is planned. Full content coming soon.
Prerequisites¶
- Module 04: Asynchronous JavaScript
What You'll Learn¶
- The DOM tree: nodes, elements, text nodes;
querySelector,querySelectorAll,getElementById - Reading and writing DOM content:
textContent,innerHTML(and why it's dangerous),setAttribute,classList - Creating, inserting, and removing DOM elements:
createElement,appendChild,insertAdjacentElement,removeChild - Event handling:
addEventListener, the event object, bubbling and capturing,preventDefault,stopPropagation, event delegation - The Fetch API: making HTTP requests, reading responses (
response.json(),response.text()), request options (method, headers, body) - Web Storage:
localStorageandsessionStorage— reading, writing, and removing data