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

Add bindings for context menu API #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fvito
Copy link

@fvito fvito commented Dec 28, 2023

Hello, this PR adds support for the Chrome's ContextMenus API

According to the Firefox docs, Firefox should also support this API to the same level as Chrome, but they also have additional properties. I'm not sure how best to support them as well have a different namespace, menus vs contextMenus

There is also a case where certain properties return number|string which I was not sure how to model them as Option<JsValue> is not possible. One option would be drop the Option part and use just JsValue

I also have the structs for the OnClickData and the createProperties object, but I'm not sure if they should be in this crate or the web-extensions one.

Also, I'm not that familiar with Rust yet, so let me know if anything needs changes

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