浏览器周围 Javascript 中的实例评估
来自 Coffeekup 和 JAML 的源代码,(在处理 问题),我们可以看到一种破解 ruby 实例评估 到 Javascript (JAML 作者解释更多)。它涉及反编译函数,并围绕 with 块对其进行评估。
问题是:所有浏览器/js 运行时都支持这一点吗?我知道它可以在 firefox、opera 和 chrome 上运行,但是函数上的 toString 不 平台之间一致,因此出现了问题。
From Coffeekup and JAML's source, (while working on question), we can see a way to hack ruby's instance eval into Javascript (JAML author explains more). It involves decompiling the function, and evaluating it around a with block.
The question is: is this supported all around browsers/js runtimes? I know it works on firefox, opera and chrome, but toString on function is not consistent among platforms, hence the question.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经检查过了,它确实适用于所有浏览器。
I've checked it out, and It does work on all browsers.