Tin mới
JavaScript: Scripting language
Web APIs: Programming interfaces
Structuring content with HTML module
Dynamic scripting with JavaScript module
A DisposableStack is not exactly a "stack" in terms of its interface. It has several methods for pushing disposers to it, but it has no way to pop one disposer off. Rather, all disposers are popped and executed one-by-on
DisposableStack.prototype.constructor
The constructor function that created the instance object. For DisposableStack instances, the initial value is the DisposableStack constructor.
DisposableStack.prototype.disposed
The constructor function that created the instance object. For DisposableStack instances, the initial value is the DisposableStack constructor.
The initial value of the [Symbol.toStringTag] property is the string "DisposableStack". This property is used in Object.prototype.toString().
The initial value of the [Symbol.toStringTag] property is the string "DisposableStack". This property is used in Object.prototype.toString().
DisposableStack.prototype.adopt()
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
DisposableStack.prototype.defer()
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
DisposableStack.prototype.dispose()
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
DisposableStack.prototype.move()
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
DisposableStack.prototype.use()
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
DisposableStack.prototype[Symbol.dispose]
Registers a value that doesn't implement the disposable protocol to the stack by providing a custom disposer function.
This page was last modified on Jul 29, 2025 by MDN contributors.