source: trip-planner-front/node_modules/zone.js/fesm2015/zone-patch-electron.js@ 6a80231

Last change on this file since 6a80231 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1'use strict';
2/**
3 * @license Angular v12.0.0-next.0
4 * (c) 2010-2020 Google LLC. https://angular.io/
5 * License: MIT
6 */
7/**
8 * @license
9 * Copyright Google LLC All Rights Reserved.
10 *
11 * Use of this source code is governed by an MIT-style license that can be
12 * found in the LICENSE file at https://angular.io/license
13 */
14Zone.__load_patch('electron', (global, Zone, api) => {
15 function patchArguments(target, name, source) {
16 return api.patchMethod(target, name, (delegate) => (self, args) => {
17 return delegate && delegate.apply(self, api.bindArguments(args, source));
18 });
19 }
20 const { desktopCapturer, shell, CallbacksRegistry, ipcRenderer } = require('electron');
21 // patch api in renderer process directly
22 // desktopCapturer
23 if (desktopCapturer) {
24 patchArguments(desktopCapturer, 'getSources', 'electron.desktopCapturer.getSources');
25 }
26 // shell
27 if (shell) {
28 patchArguments(shell, 'openExternal', 'electron.shell.openExternal');
29 }
30 // patch api in main process through CallbackRegistry
31 if (!CallbacksRegistry) {
32 if (ipcRenderer) {
33 patchArguments(ipcRenderer, 'on', 'ipcRenderer.on');
34 }
35 return;
36 }
37 patchArguments(CallbacksRegistry.prototype, 'add', 'CallbackRegistry.add');
38});
Note: See TracBrowser for help on using the repository browser.