doSend function
Last updated: 2026-03-04T23:36:57.288Z
Location
Metrics
LOC: 19
Complexity: 3
Params: 1
Signature
doSend(
message: import("@/types").ExtensionMessage,
btn: HTMLButtonElement,
originalText: string,
): : Promise<void>
Source Code
async function doSend(
message: import("@/types").ExtensionMessage,
btn: HTMLButtonElement,
originalText: string,
): Promise<void> {
btn.disabled = true;
try {
const result = await sendToActiveTab(message);
const res = result as { filled?: number } | null;
const count = res?.filled ?? 0;
showStatus(`✓ ${count} ${t("filled")}`);
} catch (err) {
log.warn("Failed to send message:", err);
showStatus(t("error"), true);
} finally {
btn.disabled = false;
btn.textContent = originalText;
}
}
Dependencies (Outgoing)
| Target | Type |
|---|---|
| sendToActiveTab | calls |
| showStatus | calls |
Impact (Incoming)
| Source | Type |
|---|---|
| bindHandlers | calls |