Commit Graph

16 Commits

Author SHA1 Message Date
Joey Perrott 698b0288be build: reformat repo to new clang@1.4.0 (#36613)
PR Close #36613
2020-04-14 12:08:36 -07:00
JiaLiPassion 54634628ac fix(zone.js): Make `EventTarget` methods optional in `zone.js` extension API (#35954)
`zone.js` added `removeAllListeners` and `eventListeners` methods in `EventTarget.prototype`, but those methods only exists when user import `zone.js` and also enables `EventTarget` monkey patching.

If user:
1. Does not import `zone.js` and uses `noop` zone when bootstrapping Angular app. OR
2. Disable monkey patching of `EventTarget` patch by defining `__Zone_disable_EventTarget = true`.

Then `removeAllListeners` and `eventListeners`  methods will not be present.

PR Close #35954
2020-03-16 09:00:44 -07:00
JiaLiPassion 0f8e710c7c feat(zone.js): Monkey patch MessagePort.prototype onproperties (#34610)
Monkey patch `MessagePort.prototype.onmessage` and `MessagePort.prototype.onmessageerror` to make
these properties's value(callback function) run in the zone when these value are set.

PR Close #34610
2020-03-16 08:59:38 -07:00
Andrew Kushnir 71309d223d Revert "feat: Monkey patches MessagePort onproperties (onmessage/onmessageerror) (#34610)" (#35973)
This reverts commit 1882451ec0.

Reason: breaks some g3 targets.

PR Close #35973
2020-03-09 17:31:28 -04:00
JiaLiPassion 1882451ec0 feat: Monkey patches MessagePort onproperties (onmessage/onmessageerror) (#34610)
Close #34581

PR Close #34610
2020-03-09 12:20:46 -04:00
JiaLiPassion 8ef29b65ff fix: fix flaky test cases of passive events (#35679)
PR Close #35679
2020-03-05 15:56:53 -05:00
JiaLiPassion 4acb676f2e feat: add interface definitions which zone extends EventTarget (#35304)
Close #35173

PR Close #35304
2020-02-26 12:52:08 -08:00
JiaLiPassion f9d483e76e feat: add a temp solution to support passive event listeners. (#34503)
Now Angular doesn't support add event listeners as passive very easily.
User needs to use `elem.addEventListener('scroll', listener, {passive: true});`
or implements their own EventManagerPlugin to do that.
Angular may finally support new template syntax to support passive event, for now,
this commit introduces a temp solution to allow user to define the passive event names
in zone.js configurations.

User can define a global varibale like this.

```
(window as any)['__zone_symbol__PASSIVE_EVENTS'] = ['scroll'];
```

to let all `scroll` event listeners passive.

PR Close #34503
2020-02-24 17:30:04 -08:00
Miško Hevery e084835fb1 Revert "feat: support passive event options by defining global variables in zone.js config file (#34503)"
This reverts commit d7d359e3ee.
2020-02-21 22:16:34 +00:00
JiaLiPassion d7d359e3ee feat: support passive event options by defining global variables in zone.js config file (#34503)
PR Close #34503
2020-02-21 09:06:26 -08:00
JiaLiPassion 2c402d5c99 fix(zone.js): handle MSPointer event correctly (#31722)
Close #31699

PR Close #31722
2019-07-24 14:42:49 -07:00
JiaLiPassion 35a025fbca fix(zone.js): patch shadydom (#31717)
Close #31686

PR Close #31717
2019-07-24 14:42:14 -07:00
JiaLiPassion 716af1059c fix(zone.js): move property patch to legacy (#31660)
Close #31659

PR Close #31660
2019-07-24 14:36:43 -07:00
JiaLiPassion a182714703 fix(zone.js): should remove on symbol property after removeAllListeners (#31644)
Close #31643

PR Close #31644
2019-07-24 14:35:37 -07:00
George Kalpakas 3851544674 style: fix code style in several files (#31295)
These files have not been formatted properly, due to issues in the
`gulp format*` tasks. See previous commits (or #31295) for more details.

PR Close #31295
2019-06-26 13:29:29 -07:00
JiaLiPassion 5eb7426216 build: move zone.js to angular repo (#30962)
PR Close #30962
2019-06-20 11:27:39 -07:00