-
-
Save deepak1556/c7464adb3e9800cad04102ec07859900 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {app, BrowserWindow, ipcMain } = require('electron') | |
function createWindow () { | |
const mainWindow = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
preload: __dirname + '/preload.js', | |
sandbox: true | |
} | |
}) | |
ipcMain.on('is-accessible', (ev) => { | |
ev.returnValue = app.isAccessibilitySupportEnabled() | |
}) | |
mainWindow.loadURL('https://vscode-web-test-playground.azurewebsites.net/?enter=true') | |
} | |
app.on('ready', createWindow) | |
app.on('window-all-closed', function () { | |
app.quit() | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "electron-accessibility-test", | |
"version": "1.0.0", | |
"description": "A minimal Electron application", | |
"main": "main.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ipcRenderer, ipcMain } = require('electron') | |
window.isAccessible = () => { | |
return ipcRenderer.sendSync('is-accessible'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment