-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
The referenced w3 API specifies:
partial interface [Navigator](https://html.spec.whatwg.org/multipage/system-state.html#navigator) {
[[SecureContext](https://webidl.spec.whatwg.org/#SecureContext), [SameObject](https://webidl.spec.whatwg.org/#SameObject)] readonly attribute [Clipboard](https://www.w3.org/TR/clipboard-apis/#clipboard) [clipboard](https://www.w3.org/TR/clipboard-apis/#dom-navigator-clipboard);
};
and sure enough, on insecure pages (with window.isSecureContext === false
) like about:blank (or any other HTTP pages), window.clipboard
is undefined.
For me, this meant that calling writeText caused my Effect computation to abort (with no error!) See screenshot:
I am not sure what the right way to address this should be. Should clipboard
have type Window -> Maybe Clipboard
instead? Internally, it could check for undefined
. That might be more robust than checking isSecureContext
.
Metadata
Metadata
Assignees
Labels
No labels