728x90 electron2 일렉트론 - 부트스트랩(bootstrap) 적용 모듈 다운로드 npm install –save jquery npm install –save bootstrap bootstrap import TEST BTN 출처: https://akageun.github.io/2018/08/22/electron-bs4.html [Electron.js] Bootstrap 4 사용하기. 언제나 개발하기를 즐기는 개발자 입니다. akageun.github.io 2022. 11. 1. Electron - Preload에서 npm 모듈 사용하기 random이라는 모듈을 사용하고 싶을 경우 main.js const mainWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, preload: path.join(__dirname, 'preload.js') } }) webPreferences 객체에 nodeIntegration: true를 추가한다. preload.js const random = require('random') window.addEventListener('DOMContentLoaded', () => { document.querySelector("#btn").addEventListener("click", ()=>{ aler.. 2022. 10. 31. 이전 1 다음 728x90