removed incompatible instanceof HTMLElement