Open
Bug 1874203
Opened 9 months ago
Updated 5 months ago
Expose a chrome-only way to tell the size of the clipboard
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, task)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
NEW
People
(Reporter: mak, Unassigned)
References
(Blocks 1 open bug)
Details
In cases like Bug 1866710 we'd like to periodically poll the text in the clipboard and enable some UI if what we find matches our expectations.
Unfortunately that (https://searchfox.org/mozilla-central/rev/961a9e56a0b5fa96ceef22c61c5e75fb6ba53395/browser/base/content/browser.js#3060) may be particularly slow if the clipboard contains a very large chunk of text, like 100MB.
It would be nice to have an API to either:
- get the size, or an estimate of what's in the clipboard
- getDataIfSmallerThan(transfer, clipboard, maxsize)
Thoughts or suggestions on how we could workaround the problem otherwise are welcome.
You need to log in
before you can comment on or make changes to this bug.
Description
•