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
Post a Comment