From 6bd044e4597dc5099819ac1a495c5b88f1fe6de9 Mon Sep 17 00:00:00 2001 From: whyboris Date: Sat, 7 Apr 2018 14:24:39 -0400 Subject: [PATCH] provide webFrame access --- src/app/providers/electron.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/providers/electron.service.ts b/src/app/providers/electron.service.ts index dfe422e81..3ecbc5f35 100644 --- a/src/app/providers/electron.service.ts +++ b/src/app/providers/electron.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; // If you import a module but never use any of the imported values other than as TypeScript types, // the resulting javascript file will look as if you never imported the module at all. -import { ipcRenderer } from 'electron'; +import { ipcRenderer, webFrame } from 'electron'; import * as childProcess from 'child_process'; @Injectable() @@ -10,12 +10,14 @@ export class ElectronService { ipcRenderer: typeof ipcRenderer; childProcess: typeof childProcess; + webFrame: typeof webFrame; constructor() { // Conditional imports if (this.isElectron()) { this.ipcRenderer = window.require('electron').ipcRenderer; this.childProcess = window.require('child_process'); + this.webFrame = window.require('electron').webFrame; } }