FinalizationRegistry
constructor creates a
FinalizationRegistry
object that uses the given callback.
new FinalizationRegistry([callback]);
callback
可选
The callback function this registry should use. If provided, this must be a function.
You create the registry passing in the callback:
const registry = new FinalizationRegistry(heldValue => {
// ....
});
| 规范 |
|---|
|
WeakRefs
The definition of 'FinalizationRegistry constructor' in that specification. |
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FinalizationRegistry()
构造函数
|
Chrome 84 | Edge 84 | Firefox 79 | IE No | Opera No | Safari No | WebView Android 84 | Chrome Android 84 | Firefox Android No | Opera Android No | Safari iOS No | Samsung Internet Android No |
nodejs
13.0.0
Disabled
|
完整支持
不支持
用户必须明确启用此特征。
FinalizationRegistry
Function
Object
Object.prototype.__defineGetter__()
Object.prototype.__defineSetter__()
Object.prototype.__lookupGetter__()
Object.prototype.__lookupSetter__()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toSource()
Object.prototype.toString()
Object.prototype.valueOf()
Object.setPrototypeOf()