Open henninglive opened 2 months ago
@henninglive what is the use case of rapidly creating many turnstile widgets at once? Do you have a production use-case where this is important?
@choyiny it's mainly an issue in test code.
We encountered this problem when writing unit tests for Angular components containing a NgxTurnstileComponent. Since jasmine unit tests typical recreate the component between each test case, we would consistently receive callbacks after the NgxTurnstileComponent had been destroyed or on a different NgxTurnstileComponent.
Rapidly creating NgxTurnstileComponents may cause the window callback to be received after components has been destroyed or on a different NgxTurnstileComponent.
Example: