{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22465","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22465/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22465/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22465/events","html_url":"https://github.com/Microsoft/TypeScript/issues/22465","id":304105004,"number":22465,"title":"SVG ElementNS missing property \"ns\"","user":{"login":"ghost","id":10137,"avatar_url":"https://avatars3.githubusercontent.com/u/10137?v=4","gravatar_id":"","url":"https://api.github.com/users/ghost","html_url":"https://github.com/ghost","followers_url":"https://api.github.com/users/ghost/followers","following_url":"https://api.github.com/users/ghost/following{/other_user}","gists_url":"https://api.github.com/users/ghost/gists{/gist_id}","starred_url":"https://api.github.com/users/ghost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghost/subscriptions","organizations_url":"https://api.github.com/users/ghost/orgs","repos_url":"https://api.github.com/users/ghost/repos","events_url":"https://api.github.com/users/ghost/events{/privacy}","received_events_url":"https://api.github.com/users/ghost/received_events","type":"User","site_admin":false},"labels":[{"id":113971304,"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-10T21:03:02Z","updated_at":"2018-03-16T19:52:33Z","closed_at":null,"author_association":"NONE","body":"The type `SVGSVGElement` does not have the property `ns`.\r\n`Property 'ns' does not exist on type '\r\n\r\n```ts\r\nlet svg = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\r\nsvg.ns = svg.namespaceURI;\r\n```\r\n\r\nHow to fix it?\r\nJust add the property `ns` to the type `SVGSVGElement`. The type is `string`.\r\nThis property is important to work with svg.\r\n\r\n```ts\r\ninterface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewBox, SVGZoomAndPan {\r\n    ns: string;\r\n}\r\n```\r\n\r\nTypeScript: 2.7.2"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/373826719","html_url":"https://github.com/Microsoft/TypeScript/issues/22465#issuecomment-373826719","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/22465","id":373826719,"user":{"login":"domske","id":28209992,"avatar_url":"https://avatars3.githubusercontent.com/u/28209992?v=4","gravatar_id":"","url":"https://api.github.com/users/domske","html_url":"https://github.com/domske","followers_url":"https://api.github.com/users/domske/followers","following_url":"https://api.github.com/users/domske/following{/other_user}","gists_url":"https://api.github.com/users/domske/gists{/gist_id}","starred_url":"https://api.github.com/users/domske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domske/subscriptions","organizations_url":"https://api.github.com/users/domske/orgs","repos_url":"https://api.github.com/users/domske/repos","events_url":"https://api.github.com/users/domske/events{/privacy}","received_events_url":"https://api.github.com/users/domske/received_events","type":"User","site_admin":false},"created_at":"2018-03-16T19:52:33Z","updated_at":"2018-03-16T19:52:33Z","author_association":"NONE","body":"I think `ns` is just an user-defined property, a shortcut for `namespaceURI`. I'm sure.\r\nPerhaps the `ns` property comes from a javascript example. This is not a property of `SVGSVGElement`.\r\nCheck out this demonstration: https://stackblitz.com/edit/typescript-4ru3wq\r\nJust use the `namespaceURI` to create path elements in svg. Otherwise the pathes are hidden.\r\n-> Close"}}
{"actor":{"display_login":"domske"}}