News for hackers. Stuff that matters.
Re:LightningJS: safe, fast, and asynchronous third-party Jav... by iamleppert on Tuesday October 25, 2011 @05:58PM (#3156054)
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?
Re:LightningJS: safe, fast, and asynchronous third-party Jav... by mjpizz on Tuesday October 25, 2011 @06:08PM (#3156084)
Good 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.