-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix #19989, add zone flags(blacklist/module) in guide #21701
Conversation
You can preview f7afee2 at https://pr21701-f7afee2.ngbuilds.io/. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked @mhevery to review the other recommendations
aio/content/guide/browser-support.md
Outdated
@@ -610,16 +610,23 @@ computed with the <a href="http://closure-compiler.appspot.com/home">closure com | |||
{@a non-cli} | |||
## Polyfills for non-CLI users | |||
|
|||
If you aren't using the CLI, you should add your polyfill scripts directly to the host web page (`index.html`), perhaps like this. | |||
If you aren't using the CLI, you should add your polyfill scripts directly to the host web page (`index.html`), perhaps like this. Before loading zone.js, you can also configure some flags which can disable zone interception for some asynchronous activities to improve performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this reads kind of poorly. could you move this sentence into a comment that would be part of the snippet below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IgorMinar , got it, I will move it.
f7afee2
to
71fa7f4
Compare
You can preview 71fa7f4 at https://pr21701-71fa7f4.ngbuilds.io/. |
aio/content/guide/browser-support.md
Outdated
<script> | ||
/** | ||
* you can configure some zone flags which can disable zone interception for some | ||
* asynchronous activities to improve performance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... improve startup performance - use these options only if you know what you are doing as it could result in hard to trace down bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IgorMinar , got it, I will update it, thank you.
aio/content/guide/browser-support.md
Outdated
// __Zone_disable_XHR = true; // disable patch XMLHttpRequest | ||
// __Zone_disable_geolocation = true; // disable patch geolocation | ||
// __Zone_disable_PromiseRejectionEvent = true; // disable trigger promise rejection event | ||
// __zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I talked to @mhevery and we think that reducing the list only to "on" events, request animation frame, and BLACK_LISTED_EVENTS would be generally more useful. the other settings don't make a big difference in practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IgorMinar , got it, I will update it.
71fa7f4
to
6ce315c
Compare
You can preview 6ce315c at https://pr21701-6ce315c.ngbuilds.io/. |
thanks!! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #19989
What is the new behavior?
add document for
zone.js
flags.Does this PR introduce a breaking change?
Other information