wasm-bindgen
wasm-bindgen copied to clipboard
APIs with the [SecureContext] attribute should be an Option<>
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
Good point! Will mark this as a breaking change so we can consider it on the next release!