From 21df57273144053e22bba2c7cf98e518e999593f Mon Sep 17 00:00:00 2001 From: Martin Stark <901824+martinstark@users.noreply.github.com> Date: Wed, 22 May 2024 18:48:25 +0200 Subject: [PATCH] docs: update error documentation (#6648) Correctly pass the event.detail to the error handler instead of the event --- docs/tutorials/errors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorials/errors.md b/docs/tutorials/errors.md index cc0978e117..7a7b774782 100644 --- a/docs/tutorials/errors.md +++ b/docs/tutorials/errors.md @@ -21,7 +21,7 @@ const player = new shaka.Player(); await player.attach(video); // handle errors that occur after load -player.addEventListener('error', handleError); +player.addEventListener('error', (event) = handleError(event.detail)); // there are two options for catching errors that occur during load