From 10e8f279332bf35c58f42813df6de49a1e5f1979 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 27 Mar 2017 08:42:02 +0000 Subject: [PATCH] fhemweb.js: apply SVG patch from andre (Forum #66122) git-svn-id: https://svn.fhem.de/fhem/trunk@13815 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/www/pgm2/fhemweb.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index b558adb11..8e436a3ba 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -1583,7 +1583,12 @@ FW_getSVG(emb) { if(emb.contentDocument) return emb.contentDocument; - if(typeof emb.getSVGDocument == "function") - return emb.getSVGDocument(); + if(typeof emb.getSVGDocument == "function") { + try { + return emb.getSVGDocument(); + } catch(err) { + // dom not loaded -> fall through -> retry; + } + } return undefined; }