Commit graph

44 commits

Author SHA1 Message Date
trop[bot]
1de0bb30b1
feat: add getPercentComplete / getCurrentBytesPerSecond / getEndTime to DownloadItem (#42915)
feat: getCurrentSpeed / getPercentComplete / getEndTime on DownloadItem

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Theo Gravity <theo@suteki.nu>
2024-07-17 09:49:05 -07:00
David Sanders
3d2a754531
chore: extend linting of code blocks in the docs (#40245)
* chore: extend linting of code blocks in the docs

* chore: combine lint:markdownlint and lint:markdown scripts
2023-11-21 16:50:08 +09:00
Milan Burda
e6b1d95a1c
docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
Samuel Attard
81795744cf
fix: ensure the typescript definitions only export correct value types (#28712)
* fix: ensure the typescript definitions only export correct value types

In typescript there are two main types of "types" you can export, value types (class, const) and definition types (type, interface).  The typescript compiler will let anything declared via const or class be used as a value.  Unfortunately we were exporting a bunch of things (see the diff) as class/const when they weren't actually exported values. This lead to typescript being happy but the runtime throwing errors (not something we want).

This change passes "exported-in" context through our docs, to the parser and then to the definitions generator to ensure we only mark things as exported in the ts defs that we actually export.

Fixes #22167

* chore: update typescript-defs

* chore: update typescript-defs

* chore: fix bad typescript in IPC test

* docs: test rendering of new syntax

* chore: update per feedback, use same syntax but with 'this is not exportedd' line
2021-06-15 13:50:31 -07:00
liulun
6aaaabd90f
docs: add more info about downloadItem.setSavePath api (#25402)
* docs: add more info about downloadItem.setSavePath api

add more info about downloadItem.setSavePath api

* Update docs/api/download-item.md

^_^

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2020-09-23 11:02:05 +09:00
Samuel Attard
eb6616e4e9
build: update to standard 14 (#24479) 2020-07-09 10:18:49 -07:00
Shelley Vohr
674e4a9fdd
chore: more modules to dual prop/fn support (#22688) 2020-03-17 18:06:52 -07:00
Shelley Vohr
3395a1d4db
doc: improve EventEmitter md formatting (#19345) 2019-07-22 08:20:43 -07:00
Charles Kerr
792f6b246c
docs: fix spelling and grammar errors (#18910) 2019-06-21 16:19:21 -05:00
Shelley Vohr
536327151d
refactor: make savePath a property on DownloadItem (#18677) 2019-06-20 10:04:57 -07:00
Heilig Benedek
ca2d74e118 feat: add methods to allow customization of save dialog during will-download event (#15497)
* feat: add method to DownloadItem that allows customization of dialog options

* docs: add docs for get/setSaveDialogOptions

* add missing copy constructor for DialogSettings on mac and linux

* fix: don't filter dialog options for mas build, don't return properties

* test: add test for get/setSaveDialogOptions

* fix: remove openDevtools added for debugging

* test: fix failing test because of new event parameter

* docs: use SaveDialogOptions instead of Object
2018-11-08 10:51:06 -04:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
TechnicalSoup
0ea296b1cb docs: specify string values for DownloadItem
Explicitly list the possible string return values for the updated and done events so that the typescript declaration file can model them more accurately. At present they are represented as a string type.

Fixes : https://github.com/electron/electron-typescript-definitions/issues/71
2018-01-03 13:34:19 +11:00
Toinane
0a0d88a5dc
remove all double spaces not needed 2017-11-29 11:58:24 +01:00
Toinane
dd139706ea
fix doc in download-item 2017-11-23 13:31:09 +01:00
Kevin Sawicki
13eeb1d17f Minor wording tweaks 2017-04-24 08:50:40 -07:00
Kevin Sawicki
99985c0ed9 Wrap header names in backticks 2017-04-24 08:49:59 -07:00
rreimann
7ea6d01a8c Rephrase note for resume method 2017-04-22 18:15:07 +02:00
rreimann
7ce3571270 Clarify requirements for resumable downloads 2017-04-21 15:14:56 +02:00
Zeke Sikelianos
e57cb713b2 link process annotations to glossary 2016-12-21 13:47:40 -08:00
deepak1556
d944219b28 add docs 2016-12-09 09:37:46 -08:00
Zeke Sikelianos
39330affda DownloadItem only needs one heading 2016-11-16 09:02:49 -08:00
Samuel Attard
aeefee7348 Fix the download-item doc so it correctly resembles a class 2016-11-11 09:22:55 -08:00
Zeke Sikelianos
ac68de6215 document process(es) for all APIs 2016-11-03 10:26:00 -07:00
Samuel Attard
d2a701a465 Document the return values of all methods in the docs 2016-09-25 12:59:30 +13:00
Kevin Sawicki
4e9b19074f Make downloadItem.getSavePath() public 2016-07-27 17:33:36 -07:00
Zeke Sikelianos
06a354a2eb standardize all javascript blocks in English docs 2016-07-26 09:48:19 -07:00
Cheng Zhao
cbcbcaeb41 docs: Make the example cover all cases 2016-06-09 20:57:29 +09:00
Cheng Zhao
dcad25c98c Add isPaused and canResume 2016-06-09 20:51:01 +09:00
Cheng Zhao
3f1dba3016 docs: Update DownloadItem for getState 2016-06-09 20:35:12 +09:00
Plusb Preco
5787bb0226 📝 Fix code style issue
* Match equality operators for consistent that `==`, `!=` by `===`,
`!==`.
* Match string expression notation `"` by `'`.

[ci skip]
2016-05-10 18:42:21 +09:00
Steve Kinney
5a9f28e034 📝 Update API documentation to ES6 [ci skip] 2016-05-04 11:59:02 -06:00
Zeke Sikelianos
2c8261b429 update excerpts based on feedback 2016-04-22 10:32:28 -07:00
Zeke Sikelianos
0527b17e42 blockquote summaries 2016-04-22 10:32:28 -07:00
Zeke Sikelianos
ee190ca62a create a one-liner description for each API 2016-04-22 10:32:28 -07:00
Alex Gleason
02c8c58c0b Fixed docs sample code programming error for DownloadItem 2016-04-19 12:47:05 -04:00
Cheng Zhao
fbb8e61958 Replace "Url" in API names with "URL" 2015-11-13 16:03:40 +08:00
Haojian Wu
4a64d1d946 📝 fix a typo
interrputed => interrupted
2015-09-25 13:13:11 +08:00
Haojian Wu
01f0643142 Fix inconsistent docs: downloadItem.getURL() => downloadItem.getUrl() 2015-09-25 09:34:04 +08:00
Haojian Wu
1879392c7b Reimplement downloadItem.getFilename API.
Previously, the suggested file name(Always 'empty') returned by
'download_item->GetSuggestedFilename' is not the same with the default one saved
in local disk.

The patch reimplement this API allowing it to return the default file name, which
is more expected from user.
2015-09-24 16:39:02 +08:00
Haojian Wu
0861d5d44b Redefine 'will-download' design. 2015-09-24 16:04:44 +08:00
Haojian Wu
57bf0cb615 Refractor in completed event in DownloadItem.
* Rename `completed` to `done`, making it align with Chromium's style.
* Add 'state' in `done` event's result. It can check the download item final
status: cancelled, completed, interrupted.
2015-09-21 14:00:38 +08:00
Haojian Wu
997ac91fe0 Add donwloadItem.getContentDisposition() API. 2015-09-21 09:38:38 +08:00
Haojian Wu
dd38131704 📝 Add DownloadItem doc. 2015-09-21 09:34:42 +08:00