Where can I find javascript native functions source code? [duplicate]

别说谁变了你拦得住时间么 提交于 2019-11-28 09:24:58

In the JavaScript engine's source code.

Both Chrome and Firefox are open source and you can look at the implementation of any part of the javascript engine in the source code for those products. Other browsers have their own implementation (like IE) that is not available to the public to look at.

The Chrome v8 javascript engine is here: http://code.google.com/p/v8/

The Firefox SpiderMonkey engine is here: https://developer.mozilla.org/en/SpiderMonkey

Warning, if you aren't already familiar with those products and their tools, it may take while to get familiar enough to find what you're looking for.

Javascript is a script language that is implemented within a Browser's code-base. This means that there may be different implementations of the script language, with different levels of quality, and possibly different intepretations of what is required. Hence the head-against-wall frustrations of many a web-developer when dealing with different web-browsers.

It is possible for you to examine a browser's implementation of Javascript if the browser is an Open Source version, eg: Chrome, Firefox, as given in other answers listed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!