Update condition from elem.parentNode to elem

This would eventually return at the html level rather than the
document level, which seems like that not what is supposed to
be happening.
Merge pull request #10 from toddmotto/fix/displayError

Update condition from elem.parentNode to elem