Rename buffer -> buffers
This commit is contained in:
parent
6ec344a499
commit
f2471cb1b7
3 changed files with 4 additions and 4 deletions
|
@ -86,7 +86,7 @@ void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
|
||||||
if (data.Get("image", &image))
|
if (data.Get("image", &image))
|
||||||
writer.WriteImage(image.AsBitmap());
|
writer.WriteImage(image.AsBitmap());
|
||||||
|
|
||||||
if (data.Get("buffer", &customBuffers)) {
|
if (data.Get("buffers", &customBuffers)) {
|
||||||
for (auto i = customBuffers.begin(); i != customBuffers.end(); ++i) {
|
for (auto i = customBuffers.begin(); i != customBuffers.end(); ++i) {
|
||||||
writer.WriteData(node::Buffer::Data(i->second),
|
writer.WriteData(node::Buffer::Data(i->second),
|
||||||
node::Buffer::Length(i->second),
|
node::Buffer::Length(i->second),
|
||||||
|
|
|
@ -173,7 +173,7 @@ Writes the `buffer` as `format` into the clipboard.
|
||||||
* `image` [NativeImage](native-image.md) (optional)
|
* `image` [NativeImage](native-image.md) (optional)
|
||||||
* `rtf` String (optional)
|
* `rtf` String (optional)
|
||||||
* `bookmark` String (optional) - The title of the url at `text`.
|
* `bookmark` String (optional) - The title of the url at `text`.
|
||||||
* `buffer` {[format: String]: Buffer} (optional) _Experimental_ - The buffers for each format you want to write
|
* `buffers` {[format: String]: Buffer} (optional) _Experimental_ - The buffers for each format you want to write
|
||||||
* `type` String (optional)
|
* `type` String (optional)
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
@ -181,7 +181,7 @@ const {clipboard} = require('electron')
|
||||||
clipboard.write({
|
clipboard.write({
|
||||||
text: 'test',
|
text: 'test',
|
||||||
html: '<b>test</b>',
|
html: '<b>test</b>',
|
||||||
buffer: {
|
buffers: {
|
||||||
'com.adobe.pdf': pdfData
|
'com.adobe.pdf': pdfData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -76,7 +76,7 @@ describe('clipboard module', function () {
|
||||||
rtf: '{\\rtf1\\utf8 text}',
|
rtf: '{\\rtf1\\utf8 text}',
|
||||||
bookmark: 'a title',
|
bookmark: 'a title',
|
||||||
image: p,
|
image: p,
|
||||||
buffer: {
|
buffers: {
|
||||||
[pdfType]: pdf
|
[pdfType]: pdf
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue