moderator-toolbox-nxg-for-reddit / modules/betterbuttons/features/disposalGuard
modules/betterbuttons/features/disposalGuard¶
Functions¶
createDisposalGuard()¶
createDisposalGuard(
scope,markerClass):DisposalGuard
Defined in: extension/data/modules/betterbuttons/features/disposalGuard.ts:25
Registers a teardown on scope that marks the guard disposed and removes every
markerClass from the document, then returns the guard.
Parameters¶
scope¶
The lifecycle whose teardown flips the flag and clears the markers.
markerClass¶
string
The CSS class the feature stamps on each processed element.
Returns¶
Interfaces¶
DisposalGuard¶
Defined in: extension/data/modules/betterbuttons/features/disposalGuard.ts:14
A teardown-aware guard for chunked DOM processing.
Methods¶
isDisposed()¶
isDisposed():
boolean
Defined in: extension/data/modules/betterbuttons/features/disposalGuard.ts:16
Whether the owning lifecycle has torn down; check before each cross-frame DOM write.
Returns¶
boolean