Google chrome doesn't take window.name into account

后端 未结 1 1298
日久生厌
日久生厌 2021-01-21 05:58

I\'ve know that in window.open(url,name... the name basically restricts a browser not to open a popup again , if a popup with the name already exists

For example Page A

相关标签:
1条回答
  • 2021-01-21 06:37

    The JS scripts in two tabs in Chrome are ran in separated contexts and cannot thus share the information on which windows did one open, one to another. This behavior is a security feature and I believe it is better explained by Google, over here.

    Depending on the level of bulletproofing required by your app, you should use either AJAX, cookies and even persistent storage to check for that window's existence and state.

    0 讨论(0)
提交回复
热议问题