browser.runtime.sendMessage() expects a callback instead of returning a promise

By design Issue #10439796


Joel M.
Jan 6, 2017
This issue is public.
Found in
  • Microsoft Edge
Reported by 4 people

Sign in to watch or report this issue.

Steps to reproduce

In a content script, call
browser.runtime.sendMessage({}).then(function(response) {

This throws an exception as sendMessage returns undefined.

Edge is supposed to support the feature as described:


0 attachments

    Comments and activity

    • browser.runtime.onMessage() has the same problem.

    • Microsoft Edge Team

      Changed Assigned To to “Akshay P.”

      Changed Assigned To from “Akshay P.” to “Snehita P.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Snehita P.” to “Akshay P.”

      Changed Assigned To from “Akshay P.” to “Abigail C.”

      Changed Status from “Confirmed” to “By design”

    • browser.runtime.connectNative() also has the same problem.
      When will u fixed these issues.

    • Hello:

      Thank you for the feedback. Microsoft Edge does not support Promises, we are evaluating it for a future release but for the meant time, please continue to use the callback model:

      Best Regards,
      The MS Edge Team

    • @Brad E. Would you consider mapping the API to the chrome variable as is the accepted method for non-Promise WebExtension APIs? The browser variable implies that Promises are supported and prevents the use of the browser polyfill. The polyfill allows for extensions to be cross-browser compatible for both Promise-based and callback-based APIs.

    You need to sign in to your Microsoft account to add a comment.

    Sign in