var supportDOMFocusIn = false try{ document.addEventListener("DOMFocusIn",function(){ supportDOMFocusIn = true },false); var event = document.createEvent("UIEvent"); event.initEvent("DOMFocusIn", false, true ); document.dispatchEvent(event) }catch(e){} alert( supportDOMFocusIn)