Documentación offline JavaScript main

DisposableStack.prototype.disposed

main Documentación oficial Licencia CC-BY-SA-2.5Descargado el 2026-08-02

En esta página

The disposed accessor property of {{jsxref("DisposableStack")}} instances returns a boolean indicating whether or not this DisposableStack has been disposed or moved by doing any of the following:

  • Calling its {{jsxref("DisposableStack/dispose", "dispose()")}} method
  • Calling its {{jsxref("DisposableStack/move", "move()")}} method
  • Declaring it with {{jsxref("Statements/using", "using")}} and letting the variable go out of scope, which automatically calls the [Symbol.dispose]() method.

Examples#

Checking if a stack is disposed#

const disposer = new DisposableStack();
console.log(disposer.disposed); // false
disposer.dispose();
console.log(disposer.disposed); // true

Specifications#

{{Specifications}}

Browser compatibility#

{{Compat}}

See also#