Our caching of constructor objects is based on the lexical global object at the time of request rather than the object we're actually lifting these objects off. This means that it is impossible for windowa to directly retrieve a dom constructor from windowb (see the attached testcase).
Created attachment 23845 [details] test case
*** Safari 16 on macOS 12.6 *** In Console: SecurityError: Blocked a frame with origin "https://bug-21138-attachments.webkit.org" from accessing a cross-origin frame. Protocols, domains, and ports must match. *** STP 153 *** In Console: SecurityError: Blocked a frame with origin "https://bug-21138-attachments.webkit.org" from accessing a cross-origin frame. Protocols, domains, and ports must match. *** Chrome Canary 107 *** attachment.cgi?id=23845:5 Uncaught DOMException: Blocked a frame with origin "https://bug-21138-attachments.webkit.org" from accessing a cross-origin frame. at window.onload (https://bug-21138-attachments.webkit.org/attachment.cgi?id=23845:5:61) *** Firefox Nightly 106 *** Uncaught DOMException: Permission denied to access property "HTMLAnchorElement" on cross-origin object __________ These are results from all browsers. Just wanted to share the results. Thanks!
Created attachment 462402 [details] Updated test case This test case works in Safari now.