Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 41c17df

Browse files
JiaLiPassionmhevery
authored andcommitted
doc(electron): add document for electron patch (#985)
1 parent fd91152 commit 41c17df

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

NON-STANDARD-APIS.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,22 @@ import 'zone.js/dist/zone-patch-rxjs';
162162

163163
* electron
164164

165+
In electron, we patched the following APIs with `zone.js`
166+
167+
1. Browser API
168+
2. NodeJS
169+
3. Electorn Native API
170+
165171
## Usage.
166172

167-
add following line into `polyfill.ts` after load zone-mix.
173+
add/update following line into `polyfill.ts`.
168174

169175
```
170-
import 'zone.js/dist/zone-patch-electron';
176+
//import 'zone.js/dist/zone'; // originally added by angular-cli, comment it out
177+
import 'zone.js/dist/zone-mix'; // add zone-mix to patch both Browser and Nodejs
178+
import 'zone.js/dist/zone-patch-electron'; // add zone-patch-electron to patch Electron native API
171179
```
172180

173-
there is a sampel repo [zone-electron](https://github.com/JiaLiPassion/zone-electron) here
181+
there is a sampel repo [zone-electron](https://github.com/JiaLiPassion/zone-electron).
182+
174183

0 commit comments

Comments
 (0)