Node: DOM Methods
This example demonstrates how to use the DOM methods of a Node instance.
Click any of the boxes to remove them.
- lorem
- ispum
- dolor
- sit
Setting up the Node
First we need some HTML to work with.
Using DOM Methods
Most common DOM methods are available via Node instances. These can be used to add, remove, and retrieve other nodes.
Now we need a handler to remove a node when the click event fires.
Listening for Node Events
We can assign our handler to all of the items by using the all method to get a NodeList instance and using the on method to subscribe to the event.
