       drawing: drawing
       filename: filename
     catch err
-      console.error 'svgtiler.renderDOM failed to parse element:', elt
+      console.error 'svgtiler.renderDOM failed to render element:', elt
       console.error err
 
 help = ->

    ## reparented into an HTML Document.)
    svg = @svg.replace /^\s*<(?:[^<>'"\/]|'[^']*'|"[^"]*")*\s*(\/?\s*>)/,
      (match, end) ->
        unless 'xmlns' in match
          match = match[...match.length-end.length] +
            " xmlns='#{SVGNS}'" + match[match.length-end.length..]
        match

isPreact = (data) ->
  typeof data == 'object' and data?.type? and data.props?
renderPreact = (data) ->
  (window?.preactRenderToString?.default ? require('preact-render-to-string')) \
    data

$static = Symbol 'svgtiler.static'
wrapStatic = (x) -> [$static]: x  # exported as `static` but that's reserved
