简体   繁体   中英

C# WebBrowser open new window and keep javascript object

I'm trying to design a multiple tab browser with webbrowser-control,

when my webrowser invoke the following javascript.

function myFunction() {
    var myWindow = window.open("", "_blank");
    // The website need do something to get url
    myWindow.location.href = "https://www.google.com";
}

my webbrowser fire newWindow event first, then i will open a new webbrowser,

in this case the url is "about:blank",

but the problem is how to bring "myWindow" to the new webbrowser and navigate to the correct url.

thanks a lot.

在window.open中使用_parent而不是_blank。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM