{"action":"created","issue":{"url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/8","labels_url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/8/comments","events_url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/8/events","html_url":"https://github.com/crysalead-js/dom-layer/issues/8","id":76689441,"number":8,"title":"issues rendering svg elements","user":{"login":"justmeandtaken","id":10112825,"avatar_url":"https://avatars.githubusercontent.com/u/10112825?v=3","gravatar_id":"","url":"https://api.github.com/users/justmeandtaken","html_url":"https://github.com/justmeandtaken","followers_url":"https://api.github.com/users/justmeandtaken/followers","following_url":"https://api.github.com/users/justmeandtaken/following{/other_user}","gists_url":"https://api.github.com/users/justmeandtaken/gists{/gist_id}","starred_url":"https://api.github.com/users/justmeandtaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justmeandtaken/subscriptions","organizations_url":"https://api.github.com/users/justmeandtaken/orgs","repos_url":"https://api.github.com/users/justmeandtaken/repos","events_url":"https://api.github.com/users/justmeandtaken/events{/privacy}","received_events_url":"https://api.github.com/users/justmeandtaken/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-05-15T10:48:58Z","updated_at":"2015-05-15T17:32:56Z","closed_at":"2015-05-15T13:51:43Z","body":"@jails Got trouble rendering SVG elements.  Not sure if I should use **attrs** or **attrsNS**, but only the **attrs** sems to work. It get mounted, but not visible.\r\n\r\nWhat I had expected to see is a red circle with a thin black line around it.\r\n\r\nThis is the code:\r\n\r\n```javascript\r\n\r\nvar vtree = h({ tagName: 'svg' }, [\r\n    h({ tagName: 'circle',\r\n\t   attrs: {\r\n                    cx: 20,\r\n                    cy: 20,\r\n                    r: 10,\r\n                    stroke: \"black\",\r\n                    \"stroke-width\": 1,\r\n                    fill: \"red\"\r\n                },\r\n        props: { \"onclick\": function() { alert(\"Hello, world\"); } } // Is this working on SVG, at all?\r\n      })\r\n]);\r\n\r\n```\r\n\r\n**Update:** Got it to work when I added **namespace: \"http://www.w3.org/2000/svg\"**, but easier if this was automatic, or?\r\n\r\nAnyway, if I attach another child to it:\r\n\r\n```javascript\r\n  h({ tagName: 'a',\r\n\t    attrs: { \"xlink:href\": \"http://link\" },\r\n    }),\r\n```\r\nThe **a-tag** is not working even if I remove the **onclick** property. And I'm still confused about **attr** and **attrsNS**. Anyways, only **attr** sets the attribute, for **attrsNS** it set undefined, but the href link are set.\r\n"},"comment":{"url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/comments/102464848","html_url":"https://github.com/crysalead-js/dom-layer/issues/8#issuecomment-102464848","issue_url":"https://api.github.com/repos/crysalead-js/dom-layer/issues/8","id":102464848,"user":{"login":"jails","id":1306941,"avatar_url":"https://avatars.githubusercontent.com/u/1306941?v=3","gravatar_id":"","url":"https://api.github.com/users/jails","html_url":"https://github.com/jails","followers_url":"https://api.github.com/users/jails/followers","following_url":"https://api.github.com/users/jails/following{/other_user}","gists_url":"https://api.github.com/users/jails/gists{/gist_id}","starred_url":"https://api.github.com/users/jails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jails/subscriptions","organizations_url":"https://api.github.com/users/jails/orgs","repos_url":"https://api.github.com/users/jails/repos","events_url":"https://api.github.com/users/jails/events{/privacy}","received_events_url":"https://api.github.com/users/jails/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T17:32:56Z","updated_at":"2015-05-15T17:32:56Z","body":"There was a missing quote before the children definition (the array) https://jsfiddle.net/cby22m6z/1/"}}