开发者

Handling JavaScript calls to window.open()- not using Native Windows - Adobe AIR

I am developing an Adobe AIR application which uses both native windows and floating panels. Is is possible to enable the开发者_如何学JAVA creation of a floating window instead of a native window when a JavaScript window.open() function is called?

It is required that all of the floating windows are contained within one native window, therefore the creation of more native windows is not suitable.

I have used a Custom HTMLHost class in order to enable the creation of a native window but I can’t work out a way of creating a MDI window instead. I am using the flexMDI framework for my floating panel interface.

Any help on this would be much appreciated.


You can try hijacking the HTML's window object via code:

htmlContent.addEventListener(Event.COMPLETE, htmlLoaded);

private function myOpenFunction(...args) {

    // Do stuff with args
}

private function htmlLoaded(event:Event):void
{
    htmlContent.domWindow.open = myOpenFunction;
}

I'm not sure if that (or something very similar) will work, but it's probably the only way to do it if it can be done at all.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜