mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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 |
||
|---|---|---|
| .. | ||
| browser.spec.ts | ||
| custom-element.spec.js | ||
| define-property.spec.ts | ||
| element.spec.ts | ||
| FileReader.spec.ts | ||
| geolocation.spec.manual.ts | ||
| HTMLImports.spec.ts | ||
| MediaQuery.spec.ts | ||
| messageport.spec.ts | ||
| MutationObserver.spec.ts | ||
| Notification.spec.ts | ||
| queue-microtask.spec.ts | ||
| registerElement.spec.ts | ||
| requestAnimationFrame.spec.ts | ||
| shadydom.spec.ts | ||
| WebSocket.spec.ts | ||
| Worker.spec.ts | ||
| XMLHttpRequest.spec.ts | ||