开发者

Adobe Air - window.nativeWindow undefined

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
开发者_JAVA百科

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜