chore: rename nativeRequire to potentiallyRemoteRequire (#15971)
This commit is contained in:
parent
442c1b22e3
commit
177091ca6f
4 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const { getRemote, nativeRequire } = require('@electron/internal/renderer/remote')
|
||||
const { getRemote, potentiallyRemoteRequire } = require('@electron/internal/renderer/remote')
|
||||
|
||||
window.onload = function () {
|
||||
// Use menu API to show context menu.
|
||||
|
@ -126,7 +126,7 @@ const showFileChooserDialog = function (callback) {
|
|||
}
|
||||
|
||||
const pathToHtml5FileObject = function (path) {
|
||||
const fs = nativeRequire('fs')
|
||||
const fs = potentiallyRemoteRequire('fs')
|
||||
const blob = new Blob([fs.readFileSync(path)])
|
||||
blob.name = path
|
||||
return blob
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue