Skip to content

Conversation

fvito
Copy link
Contributor

@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

Copy link
Member

@flosse flosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently in a completely different world, so I can't really judge this PR, but I would say it's good enough to start with :-)

@flosse flosse merged commit a07578d into web-extensions-rs:main Oct 11, 2025
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.

2 participants