delegate_pointerup = function () {
		if (disable_delegate_pointerup) {
			return;
		}
		// This try-catch may only be needed for running Cypress tests.
		try {
			if (iframe.contentWindow && iframe.contentWindow.jQuery) {
				iframe.contentWindow.jQuery("body").trigger("pointerup");
			}
			if (iframe.contentWindow) {
				const event = new iframe.contentWindow.MouseEvent("mouseup", { button: 0 });
				iframe.contentWindow.dispatchEvent(event);
				const event2 = new iframe.contentWindow.MouseEvent("mouseup", { button: 2 });
				iframe.contentWindow.dispatchEvent(event2);
			}
		} catch (error) {
			console.log("Failed to access iframe to delegate pointerup; got", error);
		}
	}
@type {JQuery<HTMLIFrameElement & {$window: OSGUI$Window}> & I$Iframe}