참고소스 수정본

This commit is contained in:
LASTA_DEV01\lasta
2026-05-12 19:40:31 +09:00
parent 0f34a451fc
commit 2e9204243d
8708 changed files with 3259488 additions and 869 deletions

View File

@@ -0,0 +1,16 @@
const { app, BaseWindow, WebContentsView } = require('electron');
app.on('window-all-closed', e => e.preventDefault());
app.whenReady().then(async () => {
const win = new BaseWindow({ width: 800, height: 600 });
const viewHeight = 200;
for (let i = 0; i < 3; i++) {
const view = new WebContentsView();
win.contentView.addChildView(view);
view.setBounds({ x: 0, y: i * viewHeight, width: 800, height: viewHeight });
const colors = ['#e74c3c', '#2ecc71', '#3498db'];
const html = `<title>WebContentsView${i + 1}</title><style>body{margin:0;background:${colors[i]};display:flex;align-items:center;justify-content:center;height:100vh;font:bold 32px sans-serif;color:#fff}</style><body>WebContentsView ${i + 1}</body>`;
await view.webContents.loadURL('data:text/html,' + encodeURIComponent(html));
}
});