mirror of
https://github.com/atom/atom.git
synced 2026-01-29 00:38:11 -05:00
Add shims for legacy electron APIs
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit is contained in:
committed by
Thomas Johansen
parent
874b555fde
commit
e7444b1ebe
7
src/electron-shims.js
Normal file
7
src/electron-shims.js
Normal file
@@ -0,0 +1,7 @@
|
||||
const electron = require('electron')
|
||||
|
||||
electron.ipcRenderer.sendChannel = function () {
|
||||
const Grim = require('grim')
|
||||
Grim.deprecate('Use `ipcRenderer.send` instead of `ipcRenderer.sendChannel`')
|
||||
return this.send.apply(this, arguments)
|
||||
}
|
||||
@@ -6,6 +6,7 @@ module.exports = ({blobStore}) ->
|
||||
{getWindowLoadSettings} = require './window-load-settings-helpers'
|
||||
{ipcRenderer} = require 'electron'
|
||||
{resourcePath, isSpec, devMode, env} = getWindowLoadSettings()
|
||||
require '../src/electron-shims'
|
||||
|
||||
updateProcessEnv(env)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ module.exports = ({blobStore}) ->
|
||||
{getWindowLoadSettings} = require './window-load-settings-helpers'
|
||||
AtomEnvironment = require '../src/atom-environment'
|
||||
ApplicationDelegate = require '../src/application-delegate'
|
||||
require '../src/electron-shims'
|
||||
|
||||
{testRunnerPath, legacyTestRunnerPath, headless, logFile, testPaths} = getWindowLoadSettings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user