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; }