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

Clipboard IDL is incorrect or obsolete #14

Open
eymar opened this issue Jan 23, 2025 · 1 comment
Open

Clipboard IDL is incorrect or obsolete #14

eymar opened this issue Jan 23, 2025 · 1 comment

Comments

@eymar
Copy link

eymar commented Jan 23, 2025

In the latest version method read() returns a promise of ClipboardItems:

[SecureContext, Exposed=Window]
interface Clipboard : EventTarget {
Promise<ClipboardItems> read();
Promise<DOMString> readText();
Promise<undefined> write(ClipboardItems data);
Promise<undefined> writeText(DOMString data);
};

But in kotlinx-browser it's a promise of DataTransfer:

[SecureContext, Exposed=Window] interface Clipboard : EventTarget {
  Promise<DataTransfer> read();
  Promise<DOMString> readText();
  Promise<void> write(DataTransfer data);
  Promise<void> writeText(DOMString data);
};

https://www.w3.org/TR/clipboard-apis/#idl-index

@ApoloApps
Copy link

yeah unfortunately the idls are very outdated and even some of them are missing

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

No branches or pull requests

2 participants