I am developing a browser, it will have support for tabs.
But I have a difficulty, QWebPage::createWindow
does not differentiate window.open
to <a href="" targert="">
.
eg.:
<script>
var params = "menubar=no,location=no,resizable=no";
window.open("http://www.cnn.com/", "_blank", params);
</script>
and
<a href="http://www.cnn.com/" target="_blank">
are considered the same by QWebPage::createWindow
How to differentiate both?
When
window.open
I will create a window and when anchors will add a new tab.
In QWebPage
, whenever we open a "popup" window using window.open(...)
or window.showModal(...)
she always sends these signals:
toolBarVisibilityChangeRequested(bool))
menuBarVisibilityChangeRequested(bool))
statusBarVisibilityChangeRequested(bool))
Whether or not you've added parameters to your "Popup". So using these signs I could differentiate when it is "popup" and when it's a normal "link".