content icon indicating copy to clipboard operation
content copied to clipboard

Issue with "runtime.getPackageDirectoryEntry()": (Incorrect parameters and return value)

Open mattp0123 opened this issue 4 years ago • 1 comments

MDN URL: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/getPackageDirectoryEntry

What information was incorrect, unhelpful, or incomplete?

The parameters and return value of this API are incorrect.

Specific section or headline?

Parameters / Return value

What did you expect to see?

The parameter should be a callback function. And this is a void method so the return value should be undefined.

Did you test this? If so, how?

I did test this. I have created a chrome extension that using this API. The chrome.runtime doc did describe this method should have a callback as the parameter, and not returning a Promise.

MDN Content page report details
  • Folder: en-us/mozilla/add-ons/webextensions/api/runtime/getpackagedirectoryentry
  • MDN URL: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/getPackageDirectoryEntry
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/mozilla/add-ons/webextensions/api/runtime/getpackagedirectoryentry/index.html
  • Last commit: https://github.com/mdn/content/commit/c7d9128559ed9526914c9be5bb461445fde5866a
  • Document last modified: 2021-02-19T20:09:33.000Z

mattp0123 avatar Mar 10 '21 01:03 mattp0123

Thanks for filing, @matt-peng-0123!

This isn't supported in Firefox. If anyone would like to update the MDN documentation, please feel welcome to file a PR and ping me for review. :)

Also, does anyone know if this is supported in Safari?

caitmuenster avatar Mar 15 '21 20:03 caitmuenster