import "pkg:/source/api/apiPromise.bs"
' Base codebehind for JRGroup, the parent of every sub-panel / dialog (and,
' transitively, every JRScreen). Kept intentionally minimal: it exists only to
' provide the onDestroy() floor below.
'
' Floor for JRGroup subclasses (panels/dialogs) that DON'T override onDestroy():
' abandon any pending fetchAsync promises so a late pool response can't fire a
' callback into the destroyed node. A subclass that overrides onDestroy() and
' calls fetchAsync gets this from the auto-abandon-promises BSC plugin, which
' injects abandonApiPromises() into its own onDestroy. SG component onDestroy
' does not chain to this base, so the call can't rely on inheritance alone.
sub onDestroy()
abandonApiPromises()
end sub