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

By design Issue #10439796

Details

Author
Joel M.
Created
Jan 6, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

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

This throws an exception as sendMessage returns undefined.

Edge is supposed to support the feature as described:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime/sendMessage#Edge

Attachments

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:

      https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/runtime#Edge_incompatibilities

      Best Regards,
      The MS Edge Team

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

    Sign in