Unable to render server-side SVG because createElementNS is not available #1780

Closed
reid opened this Issue May 10, 2016 · 1 comment

Projects

None yet

2 participants

@reid
reid commented May 10, 2016

Describe your issue:

document.createElementNS is not supported in simple-dom, so server-side rendering of SVG does not work out of the box.

Can you reproduce the issue?

foo.tag

<foo>
  <svg/>
</foo>

test.js

var assert = require('assert')
var riot = require('riot')
var foo = require('./foo.tag')
assert.throws(function () {
  riot.render(foo, {})
}, /document.createElementNS is not a function/)
node test

On which browser/OS does the issue appear?

Node.js v5.5.0

Which version of Riot does it affect?

riot v2.4.0

How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini GianlucaGuarini added the bug label May 10, 2016
@GianlucaGuarini
Member

good catch! Thanks @reid I will fix it really soon

@GianlucaGuarini GianlucaGuarini self-assigned this May 10, 2016
@GianlucaGuarini GianlucaGuarini added a commit that closed this issue May 22, 2016
@GianlucaGuarini GianlucaGuarini closes #1780 d263e67
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment