Created
September 17, 2017 04:24
-
-
Save JiaLiPassion/45664f6a28c8b522fca30c841610c6b4 to your computer and use it in GitHub Desktop.
New Zone BlackList
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
// before load polyfill.js | |
<script> | |
// black list scroll event handler for addEventListener | |
Zone[Zone.__symbol__('BLACK_LISTED_EVENTS')] = ['scroll', 'mouseenter', 'mouseleave', 'mousemove', 'mouseover', 'mouseout', 'mousewheel']; | |
// black list scroll event handler for onProp | |
const targets = [window, Document.prototype, HTMLBodyElement.prototype, HTMLElement.prototype]; | |
__Zone_ignore_on_properties = []; | |
targets.forEach(function(target) { | |
__Zone_ignore_on_properties.push({ | |
target: target, | |
ignoreProperties: ['scroll', 'mouseenter', 'mouseleave', 'mousemove', 'mouseover', 'mouseout', 'mousewheel'] | |
}); | |
}); | |
// disable requestAnimationFrame | |
__Zone_disable_requestAnimationFrame = true; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@PhaedrusTheGreek, which version of
zone.js
andangular
are you using ?