-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS dialog API #16
Comments
it works. Maybe not documented? const filePaths = await window.parent.dialog({
type: 'open', // or 'save'
defaultPath: defaultPathFromSettings,
allowFiles: true,
title: 'Choose a file'
})
if (!filePaths || filePaths.length === 0 || filePaths[0] === '') return
const file = filePaths[0] |
Oh sweet. |
Oh, I think the reason why it's not documented is because I wanted to make the javascript part of the API conform to the api on MDN |
Ah, thats cool. I'm trying to hunt around for where this code is, but I'm not seeing a dialog property on the system object: https://github.com/socketsupply/ssc-node/blob/master/index.js |
you can find it here: https://github.com/socketsupply/socket/blob/master/src/lib/desktop.js#L51 |
@jwerle Has this API been documented? |
not yet! |
The API has changed and is documented now |
Things like the native open file dialog would be great.
The text was updated successfully, but these errors were encountered: