Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否要阻止对基础对象原型的拓展或修改 #16

Open
techird opened this issue May 12, 2014 · 1 comment
Open

是否要阻止对基础对象原型的拓展或修改 #16

techird opened this issue May 12, 2014 · 1 comment

Comments

@techird
Copy link
Member

techird commented May 12, 2014

在 jshint 中有一个选项 freeze,阻止下面的代码:

Array.prototype.max = function() { ... }

是否要加入这条规范?

@Singularity-zju
Copy link
Contributor

最好是允许扩展,不允许修改。。 但是好像ES5的对象方法还做不到这点 。。。
很多库还是依赖于扩展原型吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants