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.
var ws = new WeakSet(); ws.add(window); ws.has(window); // true ws.clear(); ws.has(window); // false
Not part of any current specification or draft. The method was planned for inclusion in ECMAScript 6, but dropped from the draft specification in revision 28 (October 14, 2014). Browser support for the feature was subsequently removed, and it never became part of the final standard.
|Basic support||36 — 43||No||34 — 46||No||25 — 30||No|
|Feature||Android webview||Chrome for Android||Edge mobile||Firefox for Android||Opera Android||iOS Safari||Samsung Internet|
|Basic support||36 — 43||36 — 43||No||34 — 46||25 — 30||No||Yes|