Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nw-dialog

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nw-dialog

Node Webkit Dialog

  • 1.0.0
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nw-dialog

File and Folder dialog for NWJS and Node Webkit

Installation

Use Node Mode

var dialog = require('nw-dialog')
dialog.setContext(document) // work in client
dialog.openFileDialog( ... )

Use Client Mode

<script src="nw-dialog/index.js"></script>
nw.Dialog.openFileDialog( ... )
// or
window.Dialog.openFileDialog( ... )

Example

OpenFileDialog

Simple

nw.Dialog.openFileDialog(function(result) {
	alert(result)
})

With File Type

nw.Dialog.openFileDialog('.zip, .rar', function(result) {
	alert(result)
})

Multiple Select

nw.Dialog.openFileDialog('.zip, .rar', true, function(result) {
	alert(result)
})

SaveFileDialog

Simple

nw.Dialog.saveFileDialog(function(result) {
	alert(result)
})

With File Name

nw.Dialog.saveFileDialog('name.txt', function(result) {
	alert(result)
})

File Name and Default Directory

nw.Dialog.saveFileDialog('name.txt', '/Users/didanurwanda', function(result) {
	alert(result)
})

FolderBrowseDialog

Simple

nw.Dialog.folderBrowseDialog(function(result) {
	alert(result)
})

FAQs

Package last updated on 28 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc