Use DOM constructor instead of XPCOM interface to detect DOM element