Commit Graph

30 Commits (fix-dangling)

Author SHA1 Message Date
Erick Zhao b9c4b27781
docs: backslash escape parametrized TypeScript types (#41575)
* docs: backslash escape parametrized TypeScript types

* missing instances
2024-03-25 11:19:44 +01: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
Shane Gannon 02ad8fcd5f
docs: correcting main example in WebRequest documentation (#36113)
Correcting main example

The entry `*://electron.github.io` is invalid and produces an exception. i.e.

> UnhandledPromiseRejectionWarning: TypeError: Invalid url pattern *://electron.github.io: Empty path.

Setting a valid path to resolve this issue
2022-10-27 16:18:07 +09:00
WeiZhiHuang 8ec81c1437
fix webRequest.onBeforeSendHeaders' attributes (#32474)
Co-authored-by: Wayne Huang <zjason4202@gmail.com>
2022-01-26 11:41:54 -05:00
Milan Burda e6b1d95a1c
docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
Milan Burda 53386914e1
docs: move webRequest filters definition to structures/web-request-filter.md (#29900) 2021-07-08 00:20:08 -07:00
Milan Burda 635ed5a6e3
feat: add missing resourceType conversions for webRequest listener details (#29902) 2021-07-08 00:19:16 -07:00
David Sanders 9142563748
docs: remove requestHeaders in webRequest.onHeadersReceived (#29907) 2021-06-28 15:52:06 -07: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
Jeremy Rose 088f2e625f
feat: add frame and webContents to webRequest details (#27078)
* feat: add frame and webContents to webRequest details

* chore: use frame_converter.h

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-01-11 12:20:43 +09:00
Cheng Zhao c608d6d7fb
fix: make webRequest work with WebSocket (#22040)
* fix: web request support proxying websocket

* fix: make tests work

* chore: do not use api:: code outside api/ folder

* chore: do not create proxy when no listener

* test: use separate session to avoid conflicts

* chore: address review
2020-02-11 14:56:09 +09:00
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