From 61dd02aef2e64aba3820e7d0d6fc419c307d5448 Mon Sep 17 00:00:00 2001 From: mikebender Date: Mon, 27 May 2024 11:35:42 -0400 Subject: [PATCH] More docs --- packages/jsapi-bootstrap/src/useWidget.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/jsapi-bootstrap/src/useWidget.ts b/packages/jsapi-bootstrap/src/useWidget.ts index fe898184de..1e052f323d 100644 --- a/packages/jsapi-bootstrap/src/useWidget.ts +++ b/packages/jsapi-bootstrap/src/useWidget.ts @@ -51,6 +51,8 @@ export function useWidget( } // We should be able to load the widget. Load it asynchronously, and set the widget when it's done. + // If we get cancelled before the fetch is done, we should close the widget and its exported objects. + // If not though, the consumer of the widget is expected to take ownership and close the widget appropriately. let isCancelled = false; async function loadWidgetInternal() { try {