Commit graph

42 commits

Author SHA1 Message Date
Erick Zhao
c3c4173377
docs: update formatting for mdx3 compatibility (#42052)
docs: update formatting for mdx3 compat
2024-05-07 19:20:47 -04:00
Devraj Mehta
8c71e2adc9
feat: add net module to utility process (#40017)
* chore: initial prototype of net api from utility process

* chore: update url loader to work on both browser and utility processes

* chore: add net files to utility process bundle

* chore: re-add app ready check but only on main process

* chore: replace browser thread dcheck's with sequence checker

* refactor: move url loader from browser to common

* refactor: move net-client-request.ts from browser to common

* docs: add utility process to net api docs

* refactor: move net module app ready check to browser only

* refactor: switch import from main to common after moving to common

* test: add basic net module test for utility process

* refactor: switch browser pid with utility pid

* refactor: move electron_api_net from browser to common

* chore: add fetch to utility net module

* chore: add isOnline and online to utility net module

* refactor: move net spec helpers into helper file

* refactor: break apart net module tests

Adds two additional net module test files: `api-net-session-spec.ts` for
tests that depend on a session being available (aka depend on running on
the main process) and `api-net-custom-protocols-spec.ts` for custom
protocol tests. This enables running `api-net-spec.ts` in the utility
process.

* test: add utility process mocha runner to run net module tests

* docs: add utility process to net module classes

* refactor: update imports in lib/utility to use electron/utility

* chore: check browser context before using in main process

Since the browser context supplied to the SimpleURLLoaderWrapper can now
be null for use in the UtilityProcess, adding a null check for the main
process before use to get a more sensible error if something goes wrong.

Co-authored-by: Cheng Zhao <github@zcbenz.com>

* chore: remove test debugging

* chore: remove unnecessary header include

* docs: add utility process net module limitations

* test: run net module tests in utility process individually

* refactor: clean up prior utility process net tests

* chore: add resolveHost to utility process net module

* chore: replace resolve host dcheck with sequence checker

* test: add net module tests for net.resolveHost

* docs: remove utility process limitation for resolveHost

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2024-01-04 16:20:37 -05: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
Fedor Indutny
c548f8f59e
feat: net.resolveHost (#37853) 2023-05-02 09:53:00 +02:00
Jeremy Rose
fda8ea9277
feat: add protocol.handle (#36674) 2023-03-27 10:00:55 -07:00
Jeremy Rose
6bd9ee6988
feat: net.fetch() supports custom protocols (#36606) 2023-03-02 15:47:45 -08:00
Jeremy Rose
872d1fe05a
feat: implement net.fetch (#36733) 2023-02-20 12:57:38 -08:00
Samuel Attard
e1e66fc8ac
docs: link net.request options to ClientRequestConstructorOptions (#36556) 2022-12-05 15:17:37 -08:00
Milan Burda
e6b1d95a1c
docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
Milan Burda
df1432a315
feat: add net.online / net.isOnline() (#21004) 2020-10-20 19:55:06 -07:00
Charles Kerr
c83f836faf
refactor: prefer using app.whenReady() (#21972)
* docs: add references to app.whenReady() in isReady

* refactor: prefer app.whenReady()

In the docs, specs, and lib, replace instances of `app.once('ready')`
(seen occasionally) and `app.on('ready')` (extremely common) with
`app.whenReady()`.

It's better to encourage users to use whenReady():
1. it handles the edge case of registering for 'ready' after it's fired
2. it avoids the minor wart of leaving an active listener alive for
an event that wll never fire again
2020-02-03 22:43:22 +00:00
Samuel Attard
cfd230d7f1
docs: remove implicit 'any' and 'Object' types from the docs (#19585)
* docs: remove implicit 'any' and 'Object' types from the docs

* docs: more docs improvements, remove all remaining empty interfaces

* chore: update tests for better types
2019-08-05 10:45:58 -07:00
Shelley Vohr
8ea33d69ac
fix: match net module headers & http.IncomingMessage headers (#17517)
* fix: match net module headers & http.IncomingMessage headers

* update net doc for cleanliness

* address feedback from review

* Update spec/api-net-spec.js

Co-Authored-By: codebytere <codebytere@github.com>

* add special cookie case
2019-04-02 07:41:19 -07:00
Samuel Attard
558fff69e7
chore: update to standard 12 2018-09-14 14:57:01 +10:00
Zeke Sikelianos
e57cb713b2 link process annotations to glossary 2016-12-21 13:47:40 -08:00
Kevin Sawicki
6352afb07a Link to return class type 2016-12-19 09:40:07 -08:00
Zeke Sikelianos
b084dc29ea move each API doc into its own file 2016-11-16 09:02:49 -08:00
Zeke Sikelianos
ef9d8fe9bd Merge pull request #7843 from electron/process-docs
document the process(es) in which APIs are available
2016-11-03 13:14:30 -07:00
Zeke Sikelianos
21105271a4 document processes for APIs nested in parent docs 2016-11-03 11:50:00 -07:00
Zeke Sikelianos
ac68de6215 document process(es) for all APIs 2016-11-03 10:26:00 -07:00
ali.ibrahim
49cb675057 Fixing a trivial js lint issue. 2016-11-02 11:16:37 +01:00
ali.ibrahim
e8b119e636 Formatting JavaScript sample code. 2016-11-02 10:40:51 +01:00
tinydew4
836cd017a9 Trim: docs/api/net.md 2016-11-01 03:53:45 +00:00
Zeke Sikelianos
379c3470c8 fix formatting of new net API doc 2016-10-31 15:48:06 -07:00
Kevin Sawicki
6b2848307d Merge pull request #7807 from electron/net-docs-fixup
Quick fix up of net docs
2016-10-31 09:23:07 -07:00
Brendan Forster
651b0c0f82 fixed a couple of typos 2016-10-31 08:59:26 -07:00
Samuel Attard
4ee308fcc2 Quick fix up of net docs 2016-10-31 12:43:57 +11:00
ali.ibrahim
b44d5290e2 Fixing code review issues: adding a partition options and making the session option only takes Session objects. 2016-10-25 15:47:54 +02:00
ali.ibrahim
61278f9ace Fixing code review issues. 2016-10-25 12:41:01 +02:00
ali.ibrahim
0c44d19249 net module: documenting the session property. 2016-10-20 15:48:36 +02:00
ali.ibrahim
7c17aeb6da Documenting net module: fixing linter issues. 2016-10-20 14:42:15 +02:00
ali.ibrahim
8c19d3b210 Documenting net module: various fixes. 2016-10-20 13:57:08 +02:00
ali.ibrahim
9f15191280 Formatting net documentation. 2016-10-20 12:30:03 +02:00
ali.ibrahim
69790bd7ed Documenting ClientRequest constructor options. 2016-10-20 11:58:06 +02:00
ali.ibrahim
fdfa0f4a6d Documenting the login event. 2016-10-20 11:45:45 +02:00
ali.ibrahim
7549adcfce Documenting net module: various fixes. 2016-10-19 18:31:08 +02:00
ali.ibrahim
fddbde2fd5 Documenting net module: various fixes. 2016-10-19 18:19:28 +02:00
ali.ibrahim
6e5951b764 Documenting net module: formatting. 2016-10-19 18:11:07 +02:00
ali.ibrahim
3b620b8c0c Documenting net module: various fixes. 2016-10-19 18:05:38 +02:00
ali.ibrahim
0d82fbcf37 Documenting net.IncomingMessage. 2016-10-19 16:51:44 +02:00
ali.ibrahim
5cd20a8e5d Documenting net.ClientRequest 2016-10-19 15:34:21 +02:00
ali.ibrahim
f651b21cda Fixing net doc file name. 2016-10-19 09:24:59 +02:00
Renamed from docs/api/electron.md (Browse further)