How to use the @capacitor/electron.injectCapacitor function in @capacitor/electron

To help you get started, we’ve selected a few @capacitor/electron examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jgw96 / Wavex / electron / index.js View on Github external
show: false,
    frame: false
  });

  if (isDevMode) {
    // Set our above template to the Menu Object if we are in development mode, dont want users having the devtools.
    // Menu.setApplicationMenu(Menu.buildFromTemplate(menuTemplateDev));
    // If we are developers we might as well open the devtools by default.
     mainWindow.webContents.openDevTools();
  }

  if(useSplashScreen) {
    splashScreen = new CapacitorSplashScreen(mainWindow);
    splashScreen.init();
  } else {
    mainWindow.loadURL(await injectCapacitor(`file://${__dirname}/app/index.html`), {baseURLForDataURL: `file://${__dirname}/app/`});
    mainWindow.webContents.on('dom-ready', () => {
      mainWindow.show();
    });
  }

}

@capacitor/electron

Capacitor: cross-platform mobile apps with the web

MIT
Latest version published 3 years ago

Package Health Score

73 / 100
Full package analysis