-
Notifications
You must be signed in to change notification settings - Fork 199
SVG not supported #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey! @buckle2000 SVG is partially supported in Moon v0.11.0, but had some issues. I've implemented full SVG support for v1. |
Here is an example script for SVG manipulation: var ns = 'http://www.w3.org/2000/svg'
var div = document.getElementById('drawing')
var svg = document.createElementNS(ns, 'svg')
svg.setAttributeNS(null, 'width', '100%')
svg.setAttributeNS(null, 'height', '100%')
div.appendChild(svg)
var rect = document.createElementNS(ns, 'rect')
rect.setAttributeNS(null, 'width', 100)
rect.setAttributeNS(null, 'height', 100)
rect.setAttributeNS(null, 'fill', '#f06')
svg.appendChild(rect) moon should use node.width = 100; // no
node.setAttributeNS(null, 'width', 100); // yes |
Yup! Moon v1 has full support for SVG at the moment (check out this line), but I need to make updating attributes a bit more efficient. |
I cannot find any |
I'm still in the process of making updating attributes more efficient. If you look at other discussions in other issues, I'm also just taking a break from rewriting things for Moon v1 and am rethinking Moon's goals and making a new API from scratch. |
This code yields nothing.
Seems like the svg namespace is not supported.
The text was updated successfully, but these errors were encountered: