Document and Events

Browser allows a programmer to control itself by exposing an hierarchy of objects.

In this section we’ll learn how to make use of them to query and manipulate the page.

Browser environment

  1. The global structure
  2. Summary

The browser provides us with a hierarchy of objects which we can use to control and access various information about time, screen, page, elements on a page etc.

View and position

  1. Metrics
  2. Styles and classes, getComputedStyle
  3. Re-introducing CSS positioning
  4. Coordinates

The section about view-related properties: styles, sizes, positioning etc.

Adding a script to HTML

  1. Page rendering and SCRIPT
  2. Moving scripts into HEAD
  3. Scripts at the end of BODY
  4. External scripts
  5. Summary

A script can be put anywhere on the page. The most useful places include:

  • Inside the Head tag of the document
  • At the bottom of the document, right before closing BODY

Tutorial

Donate

Donate to this project