Commit graph

19 commits

Author SHA1 Message Date
Milan Burda
c0bde4baa4 docs: responseHeaders should be Record<string, string[]> (#21730) 2020-01-12 09:20:13 -08:00
Jeremy Apthorp
af138dab55
test: move webRequest spec to main runner (#19992) 2019-08-28 13:56:15 -07:00
Shelley Vohr
49096c2359
fix: throw on invalid webRequest filters (#19337)
Closes #11371.

Previously, we didn't consider the return value of the webRequest URLPattern mate converter, which meant that when the pattern wasn't correctly parsed owing to invalid filter specification users would not be made aware of that fact and would just think that the filtering itself had failed. This corrects that error by moving the business logic of url pattern parsing out of the converter and into the function itself so that granular and specific errors can be thrown.

There's also no real reason that i'm aware of not to allow wider breadth of filters by letting users use a wildcard for effective TLD, so I also overrode that (default for the 1-arg Parse is not to allow that).

Finally, I added some examples of url filter types for users to reference.
2019-07-25 10:20:02 -07:00
Samuel Attard
f80601da16
docs: ensure that optionality matches between documented params and signatures (#18613)
* docs: ensure that optionality matches between documented params and signatures

* docs: ensure that all optional declarations are lower case

* chore: fix broken link
2019-06-04 14:03:24 -07:00
Jeremy Apthorp
901cdb22e3
test: move some BrowserWindow specs to the main runner (#18551) 2019-06-03 15:10:58 -07:00
Samuel Attard
2a08bfbcc6
docs: update type for responseHeaders in the webRequest module (#18302)
Fixes #18298
2019-05-15 18:20:37 -07:00
Linda_pp
6d55498cc7 docs: Fix types and missing property in WebRequest APIs (#17046)
* docs: Fixed hook methods of WebRequest accepts null as listener

* docs: Added missing `referrer` property in OnBeforeRequestDetails

* docs: Add `referrer` to each webRequest responses
2019-02-28 09:30:38 +00:00
Vlad Hashimoto
30213089ae docs: allow webRequest listener to passing null (#17006) 2019-02-25 18:13:00 -08:00
Shelley Vohr
bae09643c1
docs: fix referrer typedef in OnCompletedDetails (#16661) 2019-02-01 07:54:31 -08:00
Milan Burda
e2516dc808 docs: cancel is optional in OnHeadersReceivedResponse (#16506) 2019-01-25 09:41:21 -05:00
Milan Burda
dbc5f67dca docs: fix web-request.md listener signatures in electron.d.ts (#16485) 2019-01-22 08:46:40 -08:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Alexandre Lacheze
2bba11c5b0 docs: warning unicity of webRequest event listener (#13482) 2018-07-30 11:38:59 +10:00
Toinane
59607c9a17
feat(docs): fix 'optional' wording 2017-11-28 18:15:15 +01:00
Boik
0d312f3674 docs: update web-request.md 2017-09-13 22:09:21 +08:00
Samuel Attard
8e9b98360a Mark filters as optional inside webRequest 2017-09-07 14:26:37 +10:00
Milan Burda
fa0de5c2b4 Define filter argument type for WebRequest methods 2017-04-10 02:18:36 +02:00
Zeke Sikelianos
e57cb713b2 link process annotations to glossary 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
b084dc29ea move each API doc into its own file 2016-11-16 09:02:49 -08:00