* chore: add deprecation warning for the default of contextIsolation * chore: add to breaking changes * Update docs/breaking-changes.md Co-authored-by: Jeremy Apthorp <jeremya@chromium.org> * chore: fix specs on windows Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			641 B
			
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			641 B
			
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const { app, BrowserWindow } = require('electron');
 | 
						|
 | 
						|
app.commandLine.appendSwitch('--disable-software-rasterizer');
 | 
						|
 | 
						|
app.whenReady().then(() => {
 | 
						|
  const infoType = process.argv.pop();
 | 
						|
  const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } });
 | 
						|
  w.webContents.once('did-finish-load', () => {
 | 
						|
    app.getGPUInfo(infoType).then(
 | 
						|
      (gpuInfo) => {
 | 
						|
        console.log(JSON.stringify(gpuInfo));
 | 
						|
        setImmediate(() => app.exit(0));
 | 
						|
      },
 | 
						|
      (error) => {
 | 
						|
        console.error(error);
 | 
						|
        setImmediate(() => app.exit(1));
 | 
						|
      }
 | 
						|
    );
 | 
						|
  });
 | 
						|
  w.loadURL('data:text/html;<canvas></canvas>');
 | 
						|
});
 |