mbrubeck/robinson — pull request #5 by neojski (2014-11-10 07:25:50+00:00)
Title: Add link href support.

So I've implemented basic `link` support. I'm pretty sure you don't want to merge it because you don't want this toy browser to grow uncontrollably. But I wanted to leave it here and discuss a little bit.

So the tricky thing here is that I implemented `get_elements_by_tag_name` on `Node`. But it is not a `Node` method but rather `Element` method. But `Element` itself in our case (`ElementData`) does not have `children` available.
I'm not really sure what to think about the relationship between `Element` and `Node`. It's like `Element` is a type of `Node` but with limited functionality. It's not inheritance either.

I checked and servo's `Element` simply has `Node` inside of it. And
```rust
fn GetElementsByTagName(self, localname: DOMString) -> Temporary {
let window = window_from_node(self).root();
HTMLCollection::by_tag_name(*window, NodeCast::from_ref(self), localname)
}
```
is casting `Element` onto `Node`. Is this cast something more than just `self.node`?