Read: 06- Probles Domain, Objects and the DOM

  1. Materials
    • JS Ojb Literals 100-105 / Doc Obj Model 183-242

      Obj Literals

      1.Objects group togther a set of vars and functions to create a model of something you would recognize. In am obj cariables and functions take new names

  2. Variables become know as properties
  3. Functions become known as methods
  4. Literal notation is the easiest way and most popular way to create Objects

DOM

  1. The DOm specifies how browers should create a model of an HTML page and how JS can accress and update content
  2. The DOM specifies the way which the browers should structure this model using a DOM tree
  3. People also call the DOM a Application Programming Interface (API)
  4. Methods that find elements in the DOM tree are called DOM queries
  5. getElementById() and querySelector() can both search the document and return individual elements
  6. When a DOM method can return more than one element it returns a NodeList
  7. 2 ways to select an element from a NodeList = item() methond and array syntax (perferred)
  8. When you have a NodeList you can loop through each node and apply the same statments to each
  9. There are two different ways to add and remove content from a DOM tree, innerHTML property and DOM manipultion
  10. DOM trees have 4 types of nodes, doc nudes, element nodes, attribute nodes, text nodes
  11. You can select element nodes by their id or class attribute, tag name, or CSS selector syntax
  12. When a DOM query can return more than one node it will always return a NodeList
  13. An element node can you access and update its content using properties like textContent and innerHTML or DOM manipulation
  14. Element Nodes can contain multiple text nodes and child elements that are siblings of each other
  15. In older browsers, implementation of the DOM is incosistent
  16. Browsers offer tools for viewing the DOM tree

Things I want to know more about

  1. The DOM chapters where alot and confusing. I get how objects work and function but will need to spend more time working the DOM and understanding the documentation. I feel like the book went way indepth and a bit to much, I thought the DOM was the page and using the our developer tools ( the console log ) was actually working with the DOM. I will have to read this chaper again slowly.