Raised when a new window is to be created. Extends NewWindow2 with additional information about the new window.
|HTML Attribute||<element NewWindow3 = "handler(event)">|
|attachEvent Method||object.attachEvent("NewWindow3", handler)|
Event handler parameters
- ppDisp [in, out, ref]
C++ An interface pointer that, optionally, receives the IDispatch interface pointer of a new WebBrowser object or an InternetExplorer object. VB Object expression that, optionally, receives a new, hidden WebBrowser or InternetExplorer object with no URL loaded.
- Cancel [in, out, ref]
A Boolean value that determines whether the current navigation should be canceled.
- dwFlags [in]
The flags from the NWMF enumeration that pertain to the new window.
- bstrUrlContext [in]
The URL of the page that is opening the new window.
- bstrUrl [in]
The URL that is opened in the new window.
The NewWindow3 event is not raised when the user selects the New Window command on the File menu in Windows Internet Explorer. Instead, this event precedes the creation of a new window in the WebBrowser in response to a navigation targeted to a new window, or from script using the window.open method. The event is raised during the following actions:
- The user clicks a link while pressing the SHIFT or CTRL key.
- The user right-clicks a link and selects Open in New Window or Open in New Tab.
- There is a targeted navigation to a frame name that does not yet exist, or
- Script invokes window.open.
- A browser application calls Navigate or Navigate2 with the navOpenInNewWindow flag.
The application that processes this notification can respond in one of three ways:
- Create a new, hidden, non-navigated WebBrowser object or InternetExplorer object that is returned in ppDisp. On return, the object that fired this event configures and navigates (including a BeforeNavigate2 event) the new object to the target location.
- Cancel the navigation by setting Cancel to True.
- Do nothing and do not set ppDisp to any value. This will cause the object that fired the event to create a new InternetExplorer object as a separate (non-hosted) process to handle the navigation.