Closed
Description
I'm having trouble displaying my SVG. There's a few issues that I'm seeing occurring:
- The namespace ends up being
[object Object]
? Examples:
var svg = document.createElementNS( '[object Object]', 'svg' );
var defs = document.createElementNS( '[object Object]', 'defs' );
var path = document.createElementNS( '[object Object]', 'path' );
- My
defs
object doesn't get populated with styles:
Input:
<defs>
<style>.dev-1{fill:#38aecc}.dev-2{fill:#022f40}.dev-3{fill:#fff}.dev-4{fill:#5f5}</style>
</defs>
Output:
var defs = document.createElementNS( '[object Object]', 'defs' );
svg.appendChild( defs );
- For some reason there's this random text node thing occurring after every single element:
svg.appendChild( document.createTextNode( "\n " ) );
Metadata
Metadata
Assignees
Labels
No labels