Allow easy access to a nodes parent nodes.

It's slow to do this on a 3rd party side (I'm assuming because of the execution lag between ruby and JS), not to mention prone to running into ObsoleteNode errors (sometimes triggered by reaching the document when looping) so this is a way to do most of it client side.