The OpenD Programming Language

OpenNewWindowParams

The openInNewWindow delegate is given these params.

To accept the new window, call

params.accept(parent_widget);

Please note, you can force it to replace the current tab by just navigating your current thing to the given url instead of accepting it.

If you accept with a null widget, it will create a new window but then return null, since the new window is managed by the underlying webview instead of by minigui.

If you do not call accept, the pop up will be blocked.

accept returns an instance to the newly created widget, which will be a parent to the widget you passed.

accept will be called from the gui thread and it MUST not call into any other webview methods. It should only create windows/widgets and set event handlers etc.

You MUST not escape references to anything in this structure. It is entirely strictly temporary!

struct OpenNewWindowParams {
string url;
WebViewWidget delegate(Widget parent, BrowserSettings settings = BrowserSettings.init) accept;
}

Meta