-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(WebWorker): Add zone support to MessageBus
Closes #4053
- Loading branch information
Showing
35 changed files
with
611 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import {NgZone} from 'angular2/src/core/zone/ng_zone'; | ||
|
||
export class MockNgZone extends NgZone { | ||
_onEventDone: () => void; | ||
|
||
constructor() { super({enableLongStackTrace: false}); } | ||
|
||
run(fn: Function): any { return fn(); } | ||
|
||
runOutsideAngular(fn: Function): any { return fn(); } | ||
|
||
overrideOnEventDone(fn: () => void, opt_waitForAsync: boolean = false): void { | ||
this._onEventDone = fn; | ||
} | ||
|
||
simulateZoneExit(): void { this._onEventDone(); } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.