[英]C# WebBrowser open new window and keep javascript object
I'm trying to design a multiple tab browser with webbrowser-control, 我正在尝试使用webbrowser-control设计多标签浏览器,
when my webrowser invoke the following javascript. 当我的网络浏览器调用以下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, 我的Web浏览器首先触发newWindow事件,然后我将打开一个新的Web浏览器,
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. 但是问题是如何将“ myWindow”带到新的Web浏览器并导航到正确的URL。
thanks a lot. 非常感谢。
在window.open中使用_parent而不是_blank。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.