As suggested in the comments above, in order to target a window by name using the window.open method, the target window must have the same origin AND have a common opener.
chrome test:
1. open new window example.com (or any site)
window.name = 'target'
window.was_open = true
2. open new window example.com (or any site)
w = window.open('', 'target')
w.was_open //undefined
It is unknown why the same test works when the js is executed in a window console without loading content first (like example.com).
A common window cannot be targeted from multiple origins, or windows with different openers. For example, window.open cannot be used by a bookmarklet to postMessage()
to a common window.