Skip to content

ensure addListener takes a synchronous callback#406

Merged
max-baz merged 1 commit into
masterfrom
ensure-listener-synchronous
May 28, 2026
Merged

ensure addListener takes a synchronous callback#406
max-baz merged 1 commit into
masterfrom
ensure-listener-synchronous

Conversation

@max-baz
Copy link
Copy Markdown
Member

@max-baz max-baz commented May 22, 2026

Another potential improvement to help with #404

As per https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage#sendresponse:

image

I'm reusing the same pattern used in:

// handle incoming messages
chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
receiveMessage(message, sender, sendResponse);
// allow async responses after this function returns
return true;
});

@max-baz max-baz merged commit e60c2fb into master May 28, 2026
@max-baz max-baz deleted the ensure-listener-synchronous branch May 28, 2026 17:33
@Nik-mmzd
Copy link
Copy Markdown

Hello! Can you compile and publish the extension as pre-release for those who are not able to compile extension themselves or want signed crx?

@max-baz
Copy link
Copy Markdown
Member Author

max-baz commented May 31, 2026

Done ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants