Skip to content

Commit 6bd044e

Browse files
author
whyboris
committed
provide webFrame access
1 parent 05a2500 commit 6bd044e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/app/providers/electron.service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ import { Injectable } from '@angular/core';
22

33
// If you import a module but never use any of the imported values other than as TypeScript types,
44
// the resulting javascript file will look as if you never imported the module at all.
5-
import { ipcRenderer } from 'electron';
5+
import { ipcRenderer, webFrame } from 'electron';
66
import * as childProcess from 'child_process';
77

88
@Injectable()
99
export class ElectronService {
1010

1111
ipcRenderer: typeof ipcRenderer;
1212
childProcess: typeof childProcess;
13+
webFrame: typeof webFrame;
1314

1415
constructor() {
1516
// Conditional imports
1617
if (this.isElectron()) {
1718
this.ipcRenderer = window.require('electron').ipcRenderer;
1819
this.childProcess = window.require('child_process');
20+
this.webFrame = window.require('electron').webFrame;
1921
}
2022
}
2123

0 commit comments

Comments
 (0)