chore: bump chromium to 93.0.4566.0 (main) (#29980)
* chore: bump chromium in DEPS to 93.0.4562.0 * chore: update patches * [base] Made Value::Take{Dict,List}() rvalue ref-qualified.2988105
* Revert "Reland "Roll src/buildtools/third_party/libc++/trunk/ 8fa879467..79a2e924d (426 commits)""2995482
This reverts commit 9691d6c265f010791c37d374248559969980ec65 and 797723ec838709ddeba0c104e30727ee0b7ac8ca * Pass gfx::Insets to GetHTComponentForFrame2984243
* chore: bump chromium in DEPS to 93.0.4563.0 * [Clipboard API] Clipboard Custom Formats implementation Part 2.2967649
* chore: update patches * chore: bump chromium in DEPS to 93.0.4564.0 * chore: bump chromium in DEPS to 93.0.4565.0 * chore: update patches * Prevent use of base::NoDestructor for trivially-destructible types2998672
* chore: update patches * fixup! [Clipboard API] Clipboard Custom Formats implementation Part 2. * chore: bump chromium in DEPS to 93.0.4566.0 * chore: update patches * chore: add missing header * ci: do not run clipboard tests on WOA Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
7169734470
commit
2585e6d5fa
56 changed files with 194 additions and 218 deletions
|
@ -199,7 +199,7 @@ const { clipboard } = require('electron')
|
|||
|
||||
const hasFormat = clipboard.has('<p>selection</p>')
|
||||
console.log(hasFormat)
|
||||
// 'true' or 'false
|
||||
// 'true' or 'false'
|
||||
```
|
||||
|
||||
### `clipboard.read(format)` _Experimental_
|
||||
|
@ -208,6 +208,10 @@ console.log(hasFormat)
|
|||
|
||||
Returns `String` - Reads `format` type from the clipboard.
|
||||
|
||||
`format` should contain valid ASCII characters and have `/` separator.
|
||||
`a/c`, `a/bc` are valid formats while `/abc`, `abc/`, `a/`, `/a`, `a`
|
||||
are not valid.
|
||||
|
||||
### `clipboard.readBuffer(format)` _Experimental_
|
||||
|
||||
* `format` String
|
||||
|
@ -218,9 +222,9 @@ Returns `Buffer` - Reads `format` type from the clipboard.
|
|||
const { clipboard } = require('electron')
|
||||
|
||||
const buffer = Buffer.from('this is binary', 'utf8')
|
||||
clipboard.writeBuffer('public.utf8-plain-text', buffer)
|
||||
clipboard.writeBuffer('public/utf8-plain-text', buffer)
|
||||
|
||||
const ret = clipboard.readBuffer('public.utf8-plain-text')
|
||||
const ret = clipboard.readBuffer('public/utf8-plain-text')
|
||||
|
||||
console.log(buffer.equals(out))
|
||||
// true
|
||||
|
@ -238,7 +242,7 @@ Writes the `buffer` into the clipboard as `format`.
|
|||
const { clipboard } = require('electron')
|
||||
|
||||
const buffer = Buffer.from('writeBuffer', 'utf8')
|
||||
clipboard.writeBuffer('public.utf8-plain-text', buffer)
|
||||
clipboard.writeBuffer('public/utf8-plain-text', buffer)
|
||||
```
|
||||
|
||||
### `clipboard.write(data[, type])`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue