Object.prototype.* writable?
Kyle Simpson
getify at gmail.com
Sat May 7 20:04:32 PDT 2011
> Good, we're making progress. Previously I was not responding to your
> original request, I was responding to your response to Crock's message.
> Hence our confusion about premises. Thanks for making your's clearer. As
> for your original request, now that I better understand what you're
> looking for, I think SES is again a good answer. Should SES become a
> directly supported standard, there would be some opt-in as you suggest.
> For now, for SES as implemented on ES5
> <http://codereview.appspot.com/4249052/>, the interim opt-in is to run
> initSES.js first in the JavaScript context in question. In the case of a
> browser frame, the interim opt-in is to place
>
> <script src="initSES.js></script>
Unfortunately, we're back to the chicken-and-the-egg... if I could guarantee
that my code was the first to ever run on any page, almost none of the
problems I'm complaining about would be an issue, because I could just make
sandboxed copies of what I needed, and store them privately inside a
closure. Being able to "run-first" is the key component that isn't true, and
if it were true (which is required of "initSES.js"), then I wouldn't need
"initSES.js".
So, while I agree that the direction of SES seems to be along the lines I am
asking for, the interim story doesn't really hold much water. The good news
is that some movement is happening toward it. I hope that continues.
Is the thought that you would have a similar opt-in to "SES" as you do
"strict mode", eventually? Or something else?
--Kyle
More information about the es-discuss
mailing list