Why don't you add it into the events?
-----Original Message-----
From: gasmor [mailto:[email protected]]
Sent: Thursday, 16 September 2010 4:54 PM
To: MooTools Users
Subject: [Moo] iframe keypress for firefox and Explorer
Hi All,
i have this code:
window.addEvent('domready', function(){
var myIFrame = new IFrame({
styles: {
width: '100%',
height: '190px',
border: '1px solid
#333'
},
id: "Composition",
events: {
load:
function(){
DOC
= this.contentWindow.document;
DOC.open();
DOC.write("<html><head></head><body>Hallo!</body></html>");
DOC.close();
DOC.designMode = 'on';
load_toolbar();
}
}
}).inject($('for_iframe'));
DOC.addEvent('keydown', function(event){ alert(event.key) });
});
This code it's ok only in Chrome Browser but not in Firefox and IE.