Weird coverage highlighting with istanbul-instrumenter-loader and Webpack
Hello all,
I may not be the only one to have wasted hours trying to figure out why the coverage report looked like this:
The reason was subtle:
Another Web Development Blog
Hello all,
I may not be the only one to have wasted hours trying to figure out why the coverage report looked like this:
The reason was subtle:
Hello all,
A quick snippet that can prove to be useful:
<div onWheel={ event => {
if (event.nativeEvent.wheelDelta > 0) {
console.log('scroll up');
} else {
console.log('scroll down');
}
}}
>
scroll on me!
</div>
onWheel synthetic event returns an event object having an attribute named nativeEvent
containing the original event information. wheelDelta
is used to detect the direction even if there is no effective scroll (overflow:hidden
).