In a web application, I have an additional popup window in which the contents of the log are loaded. This window opens through Javascript using window.open().
Typically, users have several application tabs, and my intention is to always use the same popup (if it is currently open), regardless of which tab they launch the popup on. To do this, I use code like this to open a popup:
<script>
function myFunction() {
var myWindow = window.open("popup.html", "my_popup", "width=600,height=400,status,resizable");
}
</script>
This works fine in Firefox and IE - only one pop-up window ever opens, and all the content I want to record is loaded into this window.
However, Chrome and Safari use different pop-ups depending on the tab from which the pop-up starts.
I suggested that the second parameter window.open()specifies the target name from the global namespace, which seems to be the case for most browsers. But Chrome and Safari behave as if there were specific namespaces for these target names, i.e. "My_popup", a link to tab 1, is for a different purpose than the "my_popup" from tab 2. (To complicate matters, tabs that were "duplicated" seem to use the same namespace, that is, they do it again use the same popup, but tabs created otherwise do not work.)
Chrome Safari , ?
, , , , , ?
:
IE 11.0.9600.18204
/ (.. ).
file:// URL http:// URL-, .
Firefox 46.0.1
/ (.. ).
file:// URL- (.. file:// URL-, , ).
20.10240.16384.0
: Edge Firefox, Chrome.
Edge.
Chrome 50.0.2661.94
(.. )
Safari 9.1
Each tab opens or reloads its own popup (i.e. the target namespace appears local to each tab)
By the way, in all these browsers the behavior does not depend on whether the pop-up window was launched due to user interaction: the behavior is identical between the cases when the pop-up window is launched through body onload()and in cases when it is loaded through button onclick().
[ , , ...;-)
, log4javascript, ( Chrome: ). log4javascript, , , , ]