javascript - Prevent F11 keydown on iframes on page? -


i have several iframes in popup window each target of form posts different sites.

i have following prevent f11 keydown on document:

document.onkeydown = function () {     if (event.keycode == 122) {          event.keycode = 0;          return false;     }  } 

goal: prevent user viewing url before , after iframe loads.

question: there better alternative meeting goal instead of handling keydown event? possible handle such event iframe holds contents of domain? possible still listen , prevent onkey events on iframe eventhough iframes incapable of having onkey attributes?

the solution should vanilla js or use little jquery references possible.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -