refactor: use helpers when using the remote module in sandboxed renderers (#15960)
This commit is contained in:
parent
d243a45173
commit
ab2a061b59
11 changed files with 46 additions and 28 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
if (process.platform === 'linux' && process.type === 'renderer') {
|
||||
// On Linux we could not access clipboard in renderer process.
|
||||
const { getRemoteForUsage } = require('@electron/internal/renderer/remote')
|
||||
module.exports = getRemoteForUsage('clipboard').clipboard
|
||||
const { getRemote } = require('@electron/internal/renderer/remote')
|
||||
module.exports = getRemote('clipboard')
|
||||
} else {
|
||||
const clipboard = process.atomBinding('clipboard')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue