adding custom frame to about blank electron

  anchor, browser, electron, javascript, windows

hi im making a desktop app from a site my friend runs using electronJS and now i got a custom frame for the app but as soon as i press a <a type="blank" ..> a new window will appear w/o any frame can someone help me w/ this?

app.html

    <div class="window-header">
      <div class="buttons">
        <button id="min-window" class="min-window"> <img src="https://i.imgur.com/racg8Mi.png" alt="min"> </button>
        <button id="max-window" class="max-window"> <img src="https://i.imgur.com/ozgOxNP.png" alt="min-max"> </button>
        <button id="close-window" class="close-window"> <img src="https://i.imgur.com/94iSLKb.png" alt="close"> </button>
      </div>
      <div class="app-name">
        <p>Title</p>
      </div>
    </div>

And my index.js (Main Script)

const electron = require('electron');
const {app, BrowserWindow} = electron

app.on("ready", () => {
  let win = new BrowserWindow({
    width:800,
    height: 600,
    frame: false,
    webPreferences: {
      nodeIntegration: true
  }
  })
  win.loadURL(`file://${__dirname}/app.html`)
})

Source: StackOverflow

LEAVE A COMMENT