2017-04-26 2 views

답변

0

사용하여 클릭 이벤트 내부의 BrowserWindowloadUrl 방법.

예 :

win = new BrowserWindow({width: 800, height: 600}) 

    const template = [ 
    { 
     label: 'Custom', 
     submenu: [ 
     { 
      label: 'navigate', 
      click() 
      { 
      win.loadURL('https://electron.atom.io'); 

      } 
     } 

     ] 
    } 
    ] 

    const menu = Menu.buildFromTemplate(template) 
    Menu.setApplicationMenu(menu) 
    // and load the index.html of the app. 
    win.loadURL(url.format({ 
    pathname: path.join(__dirname, 'index.html'), 
    protocol: 'file:', 
    slashes: true 
    })) 
+0

감사가 도움이 응답에 대한 rawel. – ajay

관련 문제