Answer the question
In order to leave comments, you need to log in
Window.frames[0].document.onkeydown not working in Firefox?
Hello people!
I'm dying here trying to figure out what the problem is. I have a code
ste.frame.document.onkeydown=function(e) {<br/>
alert('a');<br/>
};
window.frames[0].document.onkeydown=function(e){<br/>
alert('a');<br/>
}
<iframe></iframe><br/>
<script type="text/javascript"><br/>
window.frames[0].document.onkeydown=function(e){<br/>
alert('a');<br/>
}<br/>
</script>
Answer the question
In order to leave comments, you need to log in
I have it working like this:
document.addEventListener('DOMContentLoaded', function(){
window.frames[0].document.onkeydown=function(e){
alert('a');
};
});
Thanks - both options work, but not in the code of the desired plugin. Solved the problem in a different way :).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question