console.log(document.activeElement);
This code is in an iframe, when you open a page containing this iframe, "SCRIPT16389: Unspecified error" is displayed in IE 8/9 standards mode. No problem opening in quirks mode. I don't know about this, I was looking to see if IE supports document.activeElement, it is listed as> IE4.
source share