8.1.1.4.16 CanDeclareGlobalFunction ( N )
用于全局环境记录的具体环境记录方法 CanDeclareGlobalFunction 确定相应的 CreateGlobalFunctionBinding 调用是否将成功,如果调用相同的参数 N。
- 使 envRec 变为调用该方法的全局环境记录。
- 使 ObjRec 变为envRec.[[ObjectRecord]]。
- 使 globalObject 变为 ObjRec 的绑定对象。
- 使 existingProp 变为? globalObject.[[GetOwnProperty]](N)。
- 如果 existingProp 为 undefined,则返回 ? IsExtensible(globalObject)。
- 如果 existingProp.[[Configurable]] 为 true,则返回 true。
- 如果 IsDataDescriptor(existingProp) 为 true 并且 existingProp 有特性值 {[[Writable]]: true, [[Enumerable]]: true},则返回 true。
- 返回 false。