I have an Adobe Air Application opening a Window from menu tray. The html content have a javascript code doing alert(window.nativeWindow) on load.
- It works fine with an embeded html static file
- It do not works with a JSP called file
I have correctly included AIRAliases.js. Is there restriction about nativeWindow ?
My goal is to:
- Open a JSP file with a Form
- Submitting the Form to itself
- If ok, hiding the nativeWindow
But it seems nativeWindow is undefined. And window.close() did nothing
Well in fact it is a SandBox security restrcition.
- An HTML code from an other domain can't execute AIR script (eg closing window)
- All turn around are disable (eval(), onclick=, ...)
The only way to do so is to:
- Put an IFrame with bridge parameters
- Put an XML file granting more security right to Adobe application
There is a full explanation in the security chapter of AdobeAIR API
精彩评论