Some versions of Firefox do not have addEventListener etc on Node.prototype.

Use document.addEventListener instead as the base.