You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Electron fiddle already has lots of great examples for using different electron apis. I'm thinking a protocol api example could be a useful addition to the Electron fiddle examples.
Based on the electron documentation, this is how the example could look like:
const{ app, BrowserWindow, protocol }=require('electron')functioncreateWindow(){constmainWindow=newBrowserWindow({width: 800,height: 600,webPreferences: {}})mainWindow.loadURL('some-protocol://index.html')}app.whenReady().then(()=>{protocol.handle('some-protocol',()=>{returnnewResponse(Buffer.from('<h1>Hello from protocol handler</h1>'),// Could also be a string or ReadableStream.{headers: {'content-type': 'text/html'}});});createWindow()})
The text was updated successfully, but these errors were encountered:
Electron fiddle already has lots of great examples for using different electron apis. I'm thinking a protocol api example could be a useful addition to the Electron fiddle examples.
Based on the electron documentation, this is how the example could look like:
The text was updated successfully, but these errors were encountered: