4 ms·
I see you're creating an iframe and then loading the javascript script tag into the it. I assume this is how you are providing encapsulation of a unique window
by iamleppert 15y ago
I see you're creating an iframe and then loading the javascript script tag into the it. I assume this is how you are providing encapsulation of a unique window object per script. However, what about scripts that depend on access to the real window object?
- mjpizz 15y agoGood question. Since LightningJS writes the iframe with a "javascript:" URL, that iframe is really part of the same domain (and therefore same security context). To access the window on the original document, just use the "window.parent" object.