|
57 | 57 | /** |
58 | 58 | * By default, zone.js will patch all possible macroTask and DomEvents |
59 | 59 | * user can disable parts of macroTask/DomEvents patch by setting following flags |
| 60 | + * because those flags need to be set before `zone.js` being loaded, and webpack |
| 61 | + * will put import in the top of bundle, so user need to create a separate file |
| 62 | + * in this directory (for example: zone-flags.ts), and put the following flags |
| 63 | + * into that file, and then add the following code before importing zone.js. |
| 64 | + * import './zone-flags.ts'; |
| 65 | + * |
| 66 | + * The flags allowed in zone-flags.ts are listed here. |
| 67 | + * |
| 68 | + * The following flags will work for all browsers. |
| 69 | + * |
| 70 | + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame |
| 71 | + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick |
| 72 | + * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
| 73 | + * |
| 74 | + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js |
| 75 | + * with the following flag, it will bypass `zone.js` patch for IE/Edge |
| 76 | + * |
| 77 | + * (window as any).__Zone_enable_cross_context_check = true; |
| 78 | + * |
60 | 79 | */ |
61 | 80 |
|
62 | | - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame |
63 | | - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick |
64 | | - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
65 | | - |
66 | | - /* |
67 | | - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js |
68 | | - * with the following flag, it will bypass `zone.js` patch for IE/Edge |
69 | | - */ |
70 | | -// (window as any).__Zone_enable_cross_context_check = true; |
71 | | - |
72 | 81 | /*************************************************************************************************** |
73 | 82 | * Zone JS is required by default for Angular itself. |
74 | 83 | */ |
|
0 commit comments