linux: Don't use clipboard module in renderer process
This commit is contained in:
parent
4c48f0cd36
commit
200a19dad9
1 changed files with 17 additions and 12 deletions
|
@ -1,12 +1,17 @@
|
||||||
binding = process.atomBinding 'clipboard'
|
if process.platform is 'linux' and process.type is 'renderer'
|
||||||
module.exports =
|
# On Linux we could not access clipboard in renderer process.
|
||||||
availableFormats: (type='standard') -> binding._availableFormats type
|
module.exports = require('remote').require 'clipboard'
|
||||||
has: (format, type='standard') -> binding._has format, type
|
else
|
||||||
read: (format, type='standard') -> binding._read format, type
|
binding = process.atomBinding 'clipboard'
|
||||||
readText: (type='standard') -> binding._readText type
|
|
||||||
writeText: (text, type='standard') -> binding._writeText text, type
|
module.exports =
|
||||||
readHtml: (type='standard') -> binding._readHtml type
|
availableFormats: (type='standard') -> binding._availableFormats type
|
||||||
writeHtml: (markup, type='standard') -> binding._writeHtml markup, type
|
has: (format, type='standard') -> binding._has format, type
|
||||||
readImage: (type='standard') -> binding._readImage type
|
read: (format, type='standard') -> binding._read format, type
|
||||||
writeImage: (image, type='standard') -> binding._writeImage image, type
|
readText: (type='standard') -> binding._readText type
|
||||||
clear: (type='standard') -> binding._clear type
|
writeText: (text, type='standard') -> binding._writeText text, type
|
||||||
|
readHtml: (type='standard') -> binding._readHtml type
|
||||||
|
writeHtml: (markup, type='standard') -> binding._writeHtml markup, type
|
||||||
|
readImage: (type='standard') -> binding._readImage type
|
||||||
|
writeImage: (image, type='standard') -> binding._writeImage image, type
|
||||||
|
clear: (type='standard') -> binding._clear type
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue