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

electron-dl

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-dl - npm Package Compare versions

Comparing version 3.4.1 to 3.5.0

11

index.d.ts

@@ -1,2 +0,2 @@

import {BrowserView, BrowserWindow, DownloadItem} from 'electron';
import {BrowserView, BrowserWindow, DownloadItem, SaveDialogOptions} from 'electron';

@@ -121,2 +121,11 @@ declare namespace electronDl {

readonly overwrite?: boolean;
/**
Customize the save dialog.
If `defaultPath` is not explicity defined, a default value is assigned based on the file path.
@default {}
*/
readonly dialogOptions?: SaveDialogOptions;
}

@@ -123,0 +132,0 @@ }

2

index.js

@@ -90,3 +90,3 @@ 'use strict';

if (options.saveAs) {
item.setSaveDialogOptions({defaultPath: filePath});
item.setSaveDialogOptions({defaultPath: filePath, ...options.dialogOptions});
} else {

@@ -93,0 +93,0 @@ item.setSavePath(filePath);

{
"name": "electron-dl",
"version": "3.4.1",
"version": "3.5.0",
"description": "Simplified file downloads for your Electron app",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -216,2 +216,11 @@ # electron-dl

#### dialogOptions
Type: [`SaveDialogOptions`](https://www.electronjs.org/docs/latest/api/download-item#downloaditemsetsavedialogoptionsoptions)\
Default: `{}`
Customize the save dialog.
If `defaultPath` is not explicity defined, a default value is assigned based on the file path.
## Development

@@ -218,0 +227,0 @@

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