过时
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
clear()
method used to remove all elements from a
WeakSet
object, but is no longer part of ECMAScript and its implementations.
ws.clear();
clear
方法
var ws = new WeakSet(); ws.add(window); ws.has(window); // true ws.clear(); ws.has(window); // false
Not part of any standard.
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clear
弃用
非标
|
Chrome 36 — 43 | Edge No | Firefox 34 — 46 | IE No | Opera 25 — 30 | Safari No | WebView Android 37 — 43 | Chrome Android 36 — 43 | Firefox Android 34 — 46 | Opera Android 25 — 30 | Safari iOS No | Samsung Internet Android 3.0 — 4.0 | nodejs No |
不支持
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
WeakSet
WeakSet.prototype.add()
WeakSet.prototype.clear()
WeakSet.prototype.delete()
WeakSet.prototype.has()
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()