Set secure schemes in native code

Code with same functionalities should be put together.
This commit is contained in:
Cheng Zhao 2017-09-15 16:48:55 +09:00
parent 5eb4b9ad6f
commit b277353238
2 changed files with 17 additions and 3 deletions

View file

@ -1,8 +1,6 @@
const {ipcRenderer, webFrame} = require('electron')
const {ipcRenderer} = require('electron')
const {runInThisContext} = require('vm')
webFrame.registerURLSchemeAsPrivileged('chrome-extension')
// Check whether pattern matches.
// https://developer.chrome.com/extensions/match_patterns
const matchesPattern = function (pattern) {