From 1daf7a08769ffcb9bc3441d9a168a0da344ec681 Mon Sep 17 00:00:00 2001 From: Birm Date: Wed, 10 Jan 2024 18:43:33 -0500 Subject: [PATCH] test open failed event --- apps/viewer/init.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/viewer/init.js b/apps/viewer/init.js index c948b229b..c60f45b13 100644 --- a/apps/viewer/init.js +++ b/apps/viewer/init.js @@ -195,6 +195,10 @@ function initCore() { } $CAMIC.loadImg(function(e) { + $CAMIC.viewer.addHandler('open-failed', function(e){ + console.error(e.message) + alert("failed!") + }) // image loaded if (e.hasError) { // if this is a retry, assume normal behavior (one retry per slide)