|
DOM Tutorial15 October 2012 Part of my work at Google involves teaching JavaScript classes to engineers who don't have much experience with front-end programming. JavaScript is a severely messed-up language. I liken it to a cat. You can bend it into all kinds of unnatural shapes, drop it from up high, and it will land on its feet. However, occasionally the claws will deploy without warning, and you get all bloodied. But at the end of the day, it's still a cute language. JavaScript's interface with the browser's DOM turned into a pretty dry set of lecture slides that were difficult to absorb. To make the class more interesting, I created a couple of interactive DOM tutorials that walks one through how to access and manipulate the DOM. Since this is an introductory course, I'm just teaching the official DOM interface. The official data structure of the DOM is a tree, with the I don't have the heart to show my students what MSIE does with the DOM. They'll figure it out eventually. |