How to get IFRAME to listen to same events as parent (and fire the same handlers)
问题 I've got an HTML page (the parent) with an embedded IFRAME. The parent page has a couple of event listeners for mouse and keyboard events, as shown below (I'm using the Prototype library). var IdleMonitor = Class.create({ active: null, initialize: function(ii) { Element.observe(window, "mousemove", this.sendActiveSignal.bind(this)); }, sendActiveSignal: function() { console.log("MOUSE"); } }); var idleMonitor = new IdleMonitor(); The IFRAME, being a separate document and all, doesn't respond