Reading Notes
June 22, 2020
JS Chapter 3: Object Literals
- with objects, variables become properties
- functions become methods
- properties and methods have key/value pairs.
- properties and methods are keys.
- creating an object using literal notation is the most common method
- you access the properties or methods using dot notation and square brackets. see . p. 103
- object constructors can use a function as a template for creating objects.
JS Chapter 5: Document Object Model
- Document Object Model (DOM) specifies the ways in which a browser should access objects, properties, and methods
- DOM is consider to be an API.
- DOMs have document, element, attribute, and text nodes.
- Accessing and updating the DOM tree: 1. access the elements, 2. work with those elements.
- DOM queries find elements in the DOM tree. This is how script finds the element in the DOM tree…
- getElementById(‘one’);
- ways to select elements in the DOM tree are covered in pages 193-202.
- When a DOM query can return more than one node, it will return a NodeList.
- In older browsers, DOM implementation is inconsistent.
- Browsers contain tools for viewing the DOM tree.