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

APIs with the [SecureContext] attribute should be an Option<> #4085

Open
evilpie opened this issue Aug 20, 2024 · 1 comment
Open

APIs with the [SecureContext] attribute should be an Option<> #4085

evilpie opened this issue Aug 20, 2024 · 1 comment
Labels
breaking-change Tracking breaking changes for the next major version bump (if ever) bug

Comments

@evilpie
Copy link
Contributor

evilpie commented Aug 20, 2024

Describe the Bug

Any API marked with the [SecureContext] attribute (e.g. the Clipboard API) will be unavailable in non-secure contexts (i.e. HTTP), trying to use the API will result in panics.

Expected Behavior

For example Navigator::clipboard should return Option<Clipboard>

Actual Behavior

For example Navigator::clipboard returns Clipboard

Additional Context

https://webidl.spec.whatwg.org/#SecureContext

@evilpie evilpie added the bug label Aug 20, 2024
@daxpedda
Copy link
Collaborator

Good point!
Will mark this as a breaking change so we can consider it on the next release!

@daxpedda daxpedda added the breaking-change Tracking breaking changes for the next major version bump (if ever) label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Tracking breaking changes for the next major version bump (if ever) bug
Projects
None yet
Development

No branches or pull requests

2 participants