Course lesson

Prevent WebSocket Event Propagation Between Listeners with MSW

Mocking WebSocket APIs resembles how you use them in the actual code. This means that you can control the event flow for your client and server events as you normally would when using EventTarget. Let's explore how to use event.stopPropagation() and...

Duration
2 min
Access
Free
Transcript
Needs source

Mocking WebSocket APIs resembles how you use them in the actual code. This means that you can control the event flow for your client and server events as you normally would when using EventTarget. Let's explore how to use event.stopPropagation() and event.stopImmediatePropagation() to achieve behavior layering when mocking WebSocket events.

Resources