angular-docs-cn/packages/zone.js/lib
JiaLiPassion 27358eb60f feat(zone.js): monkey patches queueMicrotask() (#38904)
Close #38863

Monkey patches `queueMicrotask()` API, so the callback runs in the zone
when scheduled, and also the task is run as `microTask`.

```
Zone.current.fork({
  name: 'queueMicrotask',
  onScheduleTask: (delegate: ZoneDelegate, curr: Zone, target: Zone, task: Task) => {
    logs.push(task.type);
    logs.push(task.source);
    return delegate.scheduleTask(target, task);
  }
}).run(() => {
    queueMicrotask(() => {
      expect(logs).toEqual(['microTask', 'queueMicrotask']);
      expect(Zone.current.name).toEqual('queueMicrotask');
      done();
  });
});

```

PR Close #38904
2020-11-05 11:23:33 -08:00
..
browser feat(zone.js): monkey patches queueMicrotask() (#38904) 2020-11-05 11:23:33 -08:00
closure build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
common refactor(zone.js): rename BlacklistedStackFrames to InternalZoneJsStackFrames (#38978) 2020-09-28 16:23:41 -04:00
extra fix(zone.js): remove unused Promise overwritten setter logic (#36851) 2020-06-11 18:56:19 -07:00
jasmine refactor(zone.js): rename several internal apis in fake async zone spec (#39127) 2020-10-13 15:56:22 -07:00
jest refactor(zone.js): rename several internal apis in fake async zone spec (#39127) 2020-10-13 15:56:22 -07:00
mix build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
mocha build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node fix(zone.js): patch nodejs EventEmtter.prototype.off (#37863) 2020-07-24 15:45:00 -07:00
rxjs fix(zone.js): zone patch rxjs should return null _unsubscribe correctly. (#37091) 2020-07-27 12:10:27 -07:00
testing feat(zone.js): add jest fakeTimers support (#39016) 2020-10-05 13:23:17 -07:00
zone-spec refactor(zone.js): rename several internal apis in fake async zone spec (#39127) 2020-10-13 15:56:22 -07:00
BUILD.bazel build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182) 2020-10-08 11:54:59 -07:00
zone-global.d.ts fix(zone.js): remove global declaration (#37861) 2020-10-23 15:19:49 -07:00
zone.api.extensions.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
zone.configurations.api.ts feat(zone.js): monkey patches queueMicrotask() (#38904) 2020-11-05 11:23:33 -08:00
zone.ts fix(zone.js): remove global declaration (#37861) 2020-10-23 15:19:49 -07:00