Notifying iFrame page from Firefox extension?

Posted by Crashalot on Stack Overflow See other posts from Stack Overflow or by Crashalot
Published on 2010-01-19T09:44:20Z Indexed on 2010/03/15 23:09 UTC
Read the original article Hit count: 597

I'm writing a Firefox extension and need to notify an iFrame page of certain events. The iFrame page is contained within a sidebar created by the extension, and this iFrame page is controlled by me.

When I load the iFrame page, the extension code needs to send a notification and trigger something to happen within the iFrame page.

To accomplish this, I'm creating an event from the extension Javascript and firing the event, which the iFrame page is listening to.

Unfortunately, when invoking document.createEvent(), this error pops up (copied, with the quotes, straight out of Firebug):

Operation is not supported" code: "9

Any clues on the error, or suggestions on how to trigger something in an iFrame page from the extension Javascript?

Thanks!

© Stack Overflow or respective owner

Related posts about firefox-addon

Related posts about iframe