Rename buffer -> buffers

This commit is contained in:
Ryohei Ikegami 2017-04-21 16:28:23 +09:00 committed by Kevin Sawicki
parent 6ec344a499
commit f2471cb1b7
3 changed files with 4 additions and 4 deletions

View file

@ -86,7 +86,7 @@ void Clipboard::Write(const mate::Dictionary& data, mate::Arguments* args) {
if (data.Get("image", &image))
writer.WriteImage(image.AsBitmap());
if (data.Get("buffer", &customBuffers)) {
if (data.Get("buffers", &customBuffers)) {
for (auto i = customBuffers.begin(); i != customBuffers.end(); ++i) {
writer.WriteData(node::Buffer::Data(i->second),
node::Buffer::Length(i->second),

View file

@ -173,7 +173,7 @@ Writes the `buffer` as `format` into the clipboard.
* `image` [NativeImage](native-image.md) (optional)
* `rtf` String (optional)
* `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)
```javascript
@ -181,7 +181,7 @@ const {clipboard} = require('electron')
clipboard.write({
text: 'test',
html: '<b>test</b>',
buffer: {
buffers: {
'com.adobe.pdf': pdfData
}
})

View file

@ -76,7 +76,7 @@ describe('clipboard module', function () {
rtf: '{\\rtf1\\utf8 text}',
bookmark: 'a title',
image: p,
buffer: {
buffers: {
[pdfType]: pdf
}
})