title: Access WebView2 newly opened window
body: <p>If I run <code>window.open(&quot;url&quot;)</code> it will open url in new <em>popup window</em>, even if it is Edge WebView2. It will just have default Windows title-bar, and read-only url bar. I need to open url from WebView exactly in new popup window, via <code>window.open(&quot;url&quot;)</code>.</p>
  <p>Is there any way to access that window from my program as far as original WebView2 child-window? By accessing I mean injecting scripts, and getting js-response after injecting.</p>
  <p>Or, at least, perhaps there is way to open url with some pre-injected script, like <code>window.open(&quot;http://google.com -javascript: alert(5)&quot;)</code>?</p>
  <hr />
  <h1>Update</h1>
  <p>Found <a href="https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/0-9-488/icorewebview2#add_newwindowrequested" rel="nofollow noreferrer">MSDN article</a>, probably this is what do I need. Trying to understand that.</p>