Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add missing api metadata for contextMenus.create #26

Closed
wants to merge 1 commit into from
Closed

fix: add missing api metadata for contextMenus.create #26

wants to merge 1 commit into from

Conversation

joelpurra
Copy link

The definition for contextMenus.create(object createProperties, function callback) was missing in the API metadata file. This lead to it to not be wrapped properly, causing crashes when expected to return a promise.

The [definition for `contextMenus.create(object createProperties, function callback)`](https://developer.chrome.com/extensions/contextMenus#method-create) was missing in the API metadata file. This lead to it to not be wrapped properly, causing crashes when expected to return a promise.
@joelpurra
Copy link
Author

Closing this pull request. Was too quick to jump to conclusions; after further debugging, I found this note in Mozilla's WebExtensions documentation for contextMenus.create():

Unlike other asynchronous functions, this one does not return a promise, but uses an optional callback to communicate success or failure. This is because its return value is the ID of the new item.

Special case. Will keep the callback for contextMenus.create().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant