理解 JavaScript 的 this 关键字
来源:互联网 发布:软件模块设计说明书 编辑:程序博客网 时间:2024/05/08 18:58
贴此图,作为 [译]理解Javascript关键字this 的注解,此图也参考了 11.2.3 Function Calls
11.2.3 Function Calls # Ⓣ
The production CallExpression : MemberExpression Arguments is evaluated as follows:
Let ref be the result of evaluating MemberExpression.
Let func be GetValue(ref).
Let argList be the result of evaluating Arguments, producing an internal list of argument values (see 11.2.4).
If Type(func) is not Object, throw a TypeError exception.
If IsCallable(func) is false, throw a TypeError exception.
If Type(ref) is Reference, then
If IsPropertyReference(ref) is true, then
Let thisValue be GetBase(ref).
Else, the base of ref is an Environment Record
Let thisValue be the result of calling the ImplicitThisValue concrete method of GetBase(ref).
Else, Type(ref) is not Reference.
Let thisValue be undefined.
Return the result of calling the [[Call]] internal method on func, providing thisValue as the this value and providing the list argList as the argument values.
The production CallExpression : CallExpression Arguments is evaluated in exactly the same manner, except that the containedCallExpression is evaluated in step 1.
NOTE The returned result will never be of type Reference if func is a native ECMAScript object. Whether calling a host object can return a value of type Reference is implementation-dependent. If a value of type Reference is returned, it must be a non-strict PropertyReference.
- 理解 JavaScript 的 this 关键字
- 理解 JavaScript 的 this 关键字
- 【javascript】javascript中this关键字的理解
- javascript的this关键字的理解
- 理解 JavaScript 的 this 关键字(代码)
- Javascript之this关键字的深入理解
- JavaScript中this关键字的理解
- 对javascript中this关键字的理解
- 关于JavaScript中this关键字的理解
- javascript中的关键字this理解
- JavaScript this 关键字 理解要领
- 深入理解javascript关键字this
- this关键字的理解。
- this关键字的理解
- javascript的this关键字
- JavaScript的this关键字
- javascript--理解Javascript之this关键字
- 【js与jquery】javascript中的this关键字的理解
- MouseEvent的target和currentTarget属性区分
- MySQL NDB 6.3.20集群安装
- 黑马程序员--类加载器小结
- 如何将QQ聊天记录保存或导入到新安装的QQ里面!
- Silverlight:开发环境准备
- 理解 JavaScript 的 this 关键字
- JSP获取上一个访问页面URL的方法
- IIS ''...\ASPNET” 登录失败
- iOS 应用程序间通信 openURL:用法总结
- Velocity的使用
- Mysql、SqlServer和Oracle 添加修改删除字段
- tar 的使用方法。
- 8086程序
- PHP内核