Closed vesten closed 9 years ago
It turns out that SVG elements have to be created with the correct namespace, otherwise it will not work. See a StackOverflow answer.
In pure JavaScript, one has to write
document.createElementNS("http://www.w3.org/2000/svg","circle");
instead of
document.createElement("circle");
in order to correctly create SVG elements.
Unfortunately, Threepenny currently does not expose the JavaScript function document.createElementNS
.
Thanks for taking the time to look in to this.
If this is a desired feature, and with enough time and forbearance, I could possibly jinn together a pull request.
This has been merged with pull request #89 .
Getting started with threepenny-gui and SVG I ported the simple example code from, http://www.w3schools.com/svg/, to this threepenny-gui Haskell,
However, when pointing a browser to http://localhost:8023 I see only the caption output and not the green and yellow circle of the example. Checking with the DOM inspector the tags seem to present, complete, and in the correct order.