Something that seems unrelated is that, in your drawWindow function you seem to be assigning an onload handler and then immediately overwriting it with a different onload handler. This is not really the problem, but I mention it just so you know.
Now, the actual problem seems to be there's a long standing bug in Firefox where it won't draw SVG to neither canvas nor Image elements if they don't have a proper width and height set (and it seems it has to be pixel based, a percentage width/height won't work either). I've just tried adding it to the <svg> template string you have in drawWindow and it does seem to solve the problem.
Thank you for letting me know and also looking into it!!
Was able to quickly fix this issue thanks to you! I've just pushed the fix to production so it should be fixed now. Would you mind testing it one more time to check if it works?
Something that seems unrelated is that, in your drawWindow function you seem to be assigning an onload handler and then immediately overwriting it with a different onload handler. This is not really the problem, but I mention it just so you know.
Now, the actual problem seems to be there's a long standing bug in Firefox where it won't draw SVG to neither canvas nor Image elements if they don't have a proper width and height set (and it seems it has to be pixel based, a percentage width/height won't work either). I've just tried adding it to the <svg> template string you have in drawWindow and it does seem to solve the problem.