i'm not sure testing `instanceof` would work with Electrolysis, so it's probably safer (and simpler) to just check while `node.parent` is not null (or just truthy).