Skip to content

Commit

Permalink
Merge pull request #10 from gnunicorn/make-safe-secure
Browse files Browse the repository at this point in the history
Mark safe as a secure protocol to enable latest HTML5 features
  • Loading branch information
joshuef authored Oct 21, 2016
2 parents e9ef744 + 0970c16 commit 9590c9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/lib/fg/import-web-apis.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { ipcRenderer } from 'electron'
import { ipcRenderer, webFrame } from 'electron'
import rpc from 'pauls-electron-rpc'

// it would be better to import this from package.json
const BEAKER_VERSION = '0.0.1'

// method which will populate window.beaker with the APIs deemed appropriate for the protocol
export default function () {

// mark the safe protocol as 'secure' to enable all DOM APIs
webFrame.registerURLSchemeAsSecure('safe');
window.beaker = { version: BEAKER_VERSION }
var webAPIs = ipcRenderer.sendSync('get-web-api-manifests', window.location.protocol)
for (var k in webAPIs) {
Expand Down

0 comments on commit 9590c9c

Please sign in to comment.