this
关键字 (The this
Keyword)new
运算符 (The new
Operator)super
关键字 (The super
Keyword)? :
) (Conditional Operator ( ? :
)),
)if
语句 (The if
Statement)do
-while
语句 (The do
-while
Statement)while
语句 (The while
Statement)for
语句 (The for
Statement)for
-in
、for
-of
与 for
-await
-of
语句continue
语句 (The continue
Statement)break
语句 (The break
Statement)return
语句 (The return
Statement)with
语句 (The with
Statement)switch
语句 (The switch
Statement)throw
语句 (The throw
Statement)try
语句 (The try
Statement)debugger
语句 (The debugger
Statement)?
u
m
/
p
1-9
0
`
WeakRef
extends
子句中的值。希望继承指定 WeakRef
行为的子类WeakRef
super
调用,以创建并初始化具有支持 WeakRef.prototype
内置方法所需内部状态的子类实例。
该函数被调用时执行以下步骤:
WeakRef.prototype
的初始值是
该属性的特性为 { [[Writable]]:
WeakRef 原型对象:
WeakRef.prototype.constructor
的初始值是
该方法被调用时执行以下步骤:
如果
let target = { foo() {} };
let weakRef = new WeakRef(target);
// ... 稍后 ...
if (weakRef.deref()) {
weakRef.deref().foo();
}
在上述示例中,如果第一次 deref 的结果不是
该属性的特性为 { [[Writable]]:
The abstract operation WeakRefDeref takes argument weakRef (a
该
FinalizationRegistry
extends
子句中的值。希望继承指定 FinalizationRegistry
行为的子类FinalizationRegistry
super
调用,以创建并初始化具有支持 FinalizationRegistry.prototype
内置方法所需内部状态的子类实例。
该函数被调用时执行以下步骤:
FinalizationRegistry.prototype
的初始值是
该属性的特性为 { [[Writable]]:
FinalizationRegistry 原型对象:
FinalizationRegistry.prototype.constructor
的初始值是
该方法被调用时执行以下步骤:
基于本规范中的算法与定义,当 finalizationRegistry.[[Cells]] 包含 cell 时,cell.[[HeldValue]] 是存活的;然而这并不一定意味着 cell.[[UnregisterToken]] 或 cell.[[Target]] 是存活的。例如,用对象自身作为其注销标记(unregister token)进行注册并不会使该对象永久存活。
该方法被调用时执行以下步骤:
该属性的特性为 { [[Writable]]: