Herein are:
- examples of writing to, reading from and manipulating the DOM.
- Unit tests for practicing use the DOM API.
You can get a copy of this code repository in several ways:
- use
gitto clone it:orgit clone https://github.com/portsoc/dom101.git
- use the GitHub CLI tool:
gh repo clone portsoc/dom101
- download a zip of this repository
- This has the disadvantage that if we publish improvements or bug fixes it will be harder for you to get hold of them (conversely using
gityou just have to typegit pullat the command line to receive the updates).
- This has the disadvantage that if we publish improvements or bug fixes it will be harder for you to get hold of them (conversely using
If you're not familiar with the git & gh tools, or you have not yet installed them on your machine, we strongly suggest that you do install them and start the very worthwhile discovery process.
From your new local copy of the code:
- open
index.htmlin your browser to see the listing of tests and their pass/fail status, - edit
index.jsto add code until all the tests pass, - try to improve the code to be cleaner, while checking that the tests continue to pass,
- and you may also examine (but do not change)
test.jsto understand exactly what is being tested.
Examples of DOM access and manipulation