Introducing DOM observers

Running `api.observe.on('view_thread', function(a) {console.log(a)})` logs a `api.dom.thread` object and then gives the error `Uncaught TypeError: Cannot read property 'length' of undefined`.