angular-cn/packages/zone.js/lib/browser
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
..
api-util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser-util.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser.ts feat(zone.js): monkey patches queueMicrotask() (#38904) 2020-11-05 11:23:33 -08:00
canvas.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
custom-elements.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
define-property.ts fix(zone.js): run tests in umd format (#37582) 2020-09-08 12:44:18 -07:00
event-target-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
event-target.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
message-port.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
property-descriptor-legacy.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
property-descriptor.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
register-element.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-common.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-legacy-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
rollup-test-main.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
shadydom.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-media-query.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-notification.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-resize-observer.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-rtc-peer-connection.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
webapis-user-media.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
websocket.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00