Closed kensodemann closed 5 years ago
Hi @adamdbradley this is apparently still an issue on Stencil 2.4.0 https://github.com/ionic-team/stencil/issues/2851
Also still on the Stencil 3.0.1, any chance this has been looked at by then?
I am seeing this problem in 3.2.0, was it fixed in later versions?
Also, probably just forcing a .bind(this)
on the constructor would potentially solve this once and for all.
Stencil version:
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
Tests fail in the
MockWindow
if a third party library like GSAP (https://greensock.com/gsap) is used. From experimenting with it, it appears that the library itself is not bindingthis
to be thewindow
(or, really, theMockWindow
) when making calls to methods such asrequestAnimationFrame
.The result is this:
Other information:
In examining this, it appears that what is going on is that
this
is not properly when the call gets over toMockWindow
. I am not sure if we can do anything about that or if there was a way that theMockWindow
was intended to be used in some cases.