WeakSet.prototype.delete()
WeakSet 实例的 delete() 方法从此 WeakSet 中删除指定元素。
¥The delete() method of WeakSet instances removes the specified element from this WeakSet.
Try it
语法
参数
返回值
¥Return value
true(如果 WeakSet 对象中的元素已成功删除)。如果在 WeakSet 中找不到 value,则为 false。如果 value 不是对象或 未注册符号,则始终返回 false。
¥true if an element in the WeakSet object has been removed successfully. false if the value is not found in the WeakSet. Always returns false if value is not an object or a non-registered symbol.
示例
使用 delete()方法
规范
| Specification |
|---|
| ECMAScript Language Specification # sec-weakset.prototype.delete |
浏览器兼容性
BCD tables only load in the browser