Window.open and WindowObjectReference behavior

48 views
Skip to first unread message

Bernard Tremblay

unread,
Jan 10, 2017, 8:59:21 PM1/10/17
to Google Chrome Developer Tools

Hi,

Referring to several documentations, particularly :   https://developer.mozilla.org/en-US/docs/Web/API/Window/open

it is said that window.open('',"strWindowName") will return a windowObjectReference and :
- at first call will open a blank tab
- at next call will return the windowObjectReference to the tab (or window) previously created
This applicable into a <domain> with the accessibility rights reserves , so applied to <domain>+port.

This is true for Firefox but it is wrong for current GoogleChrome version (55.0.2883.87 m) (and some others browsers).

This is wrong because it is not the domain in which this is possible but only into the same creation tree. Exactly as if the window.open was issued with a "dependent" option.

Because this instruction is the alone way for a web application to get the windowObjectReference of a new window which have been created from the same domain (rights allowed to domain could be attached to this behavior) the current behavior is a severe limitation to developments without any obvious reason.

The reason of the difficulty is that even though the windows (tabs) of a same domain+port can exchange data (cookies and localstorage) this mean excludes particularly windowObjectReference. 

If the condition is satisfied there is a <bi-univoque> relation between strWindowName(s)  and windowObjectReference(s) into a domain+port

I could detail how wide is this limitation for development of the no disponibility of such feature .

I request that the behavior described in MDN to become the general and common rule for all browsers (note that that I could not find any document about this subject for others browsers) .

Best regards


Trebly
  
note : with the dependence from the parent it is possible to have two windows with same name into a domain+port
Reply all
Reply to author
Forward
0 new messages