Which web browsers / versions have support for document.activeElement
?
This property lets you see which element is active / has focus.
Are there any main gotchas/difference between implementations?
activeElement. The activeElement read-only property of the Document interface returns the Element within the DOM that currently has focus. Often activeElement will return a HTMLInputElement or HTMLTextAreaElement object if it has the text selection at the time.
document.activeElement is supported by IE6+, FF3+, Safari 4+, Opera 9+, Chrome 9+. (FF2, Saf3 don't support this property)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With