@daisy/ace-axe-runner-electron 1.2.3-beta.2 → 1.2.6-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -5,9 +5,13 @@ const app = electron.app;
5
5
  // const ipcMain = electron.ipcMain;
6
6
  // const ipcRenderer = electron.ipcRenderer;
7
7
 
8
+ // NO_HTTP_ADD
9
+ const protocol = electron.protocol;
10
+
8
11
  // Removes the deprecation warning message in the console
9
12
  // https://github.com/electron/electron/issues/18397
10
- app.allowRendererProcessReuse = true;
13
+ // app.allowRendererProcessReuse = true;
14
+ // https://www.electronjs.org/releases/stable#breaking-changes-1400
11
15
 
12
16
  const EventEmitter = require('events');
13
17
  class ElectronMockMainRendererEmitter extends EventEmitter {}
@@ -30,6 +34,22 @@ const ACE_LOG_PREFIX = "[ACE-AXE]";
30
34
 
31
35
  if (LOG_DEBUG) console.log(`${ACE_LOG_PREFIX} axeRunner CLI launch...`);
32
36
 
37
+ // NO_HTTP_ADD
38
+ const ACE_ELECTRON_HTTP_PROTOCOL = "acehttps";
39
+ // app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
40
+ protocol.registerSchemesAsPrivileged([{
41
+ privileges: {
42
+ allowServiceWorkers: false,
43
+ bypassCSP: false,
44
+ corsEnabled: true,
45
+ secure: true,
46
+ standard: true,
47
+ stream: true,
48
+ supportFetchAPI: true
49
+ },
50
+ scheme: ACE_ELECTRON_HTTP_PROTOCOL
51
+ }]);
52
+
33
53
  // let win;
34
54
  // app.whenReady().then(() => {
35
55
  app.on('ready', async () => {
@@ -46,6 +66,7 @@ app.on('ready', async () => {
46
66
  // sandbox: false,
47
67
  // webSecurity: true,
48
68
  // webviewTag: false,
69
+ // nativeWindowOpen: false, // The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15. See https://github.com/electron/electron/issues/28511
49
70
  // }
50
71
  // }
51
72
  // );