{"action":"created","issue":{"url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/124","repository_url":"https://api.github.com/repos/patrick-steele-idem/morphdom","labels_url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/124/comments","events_url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/124/events","html_url":"https://github.com/patrick-steele-idem/morphdom/issues/124","id":315597427,"number":124,"title":"Namespaced attributes do not update","user":{"login":"AndyOGo","id":914443,"avatar_url":"https://avatars1.githubusercontent.com/u/914443?v=4","gravatar_id":"","url":"https://api.github.com/users/AndyOGo","html_url":"https://github.com/AndyOGo","followers_url":"https://api.github.com/users/AndyOGo/followers","following_url":"https://api.github.com/users/AndyOGo/following{/other_user}","gists_url":"https://api.github.com/users/AndyOGo/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyOGo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyOGo/subscriptions","organizations_url":"https://api.github.com/users/AndyOGo/orgs","repos_url":"https://api.github.com/users/AndyOGo/repos","events_url":"https://api.github.com/users/AndyOGo/events{/privacy}","received_events_url":"https://api.github.com/users/AndyOGo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-18T18:43:35Z","updated_at":"2018-04-18T18:49:23Z","closed_at":null,"author_association":"NONE","body":"Using SVG sprites with `<use xlink:href=\"\" />` will not update the icon.\r\n\r\nThe reason is that `getAttributeNS` and `setAttributeNS` DOM APIs are inconsistent in it's arguments.\r\nE.g.: lets say 'foo:bar' ('foo' being the namespace and 'bar' the local attribute name):\r\n- `getAttributeNS` only needs the `localName`, i.e. `getAttributeNS('https://www.w3.org/1999/foo', 'bar');`\r\n   > [`getAttributeNS(namespace, localName)`](https://dom.spec.whatwg.org/#dom-element-getattributens)\r\n   > https://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-localname\r\n   > A local name is the local part of a qualified name. This is called the local part in Namespaces in XML [Namespaces].\r\n- **BUT** `setAttributeNS` expects it's fully qualified name, i.e. `getAttributeNS('https://www.w3.org/1999/foo', 'foo:bar');`\r\n   > [`setAttributeNS(namespace, qualifiedName, value)`](https://dom.spec.whatwg.org/#dom-element-setattributens)\r\n   > https://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-qualifiedname\r\n   > A qualified name is the name of an element or attribute defined as the concatenation of a local name (as defined in this specification), optionally preceded by a namespace prefix and colon character. See Qualified Names in Namespaces in XML [Namespaces].\r\n\r\n**Affected Code**\r\nhttps://github.com/patrick-steele-idem/morphdom/blob/master/src/morphAttrs.js#L19-L23\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/comments/382490773","html_url":"https://github.com/patrick-steele-idem/morphdom/issues/124#issuecomment-382490773","issue_url":"https://api.github.com/repos/patrick-steele-idem/morphdom/issues/124","id":382490773,"user":{"login":"AndyOGo","id":914443,"avatar_url":"https://avatars1.githubusercontent.com/u/914443?v=4","gravatar_id":"","url":"https://api.github.com/users/AndyOGo","html_url":"https://github.com/AndyOGo","followers_url":"https://api.github.com/users/AndyOGo/followers","following_url":"https://api.github.com/users/AndyOGo/following{/other_user}","gists_url":"https://api.github.com/users/AndyOGo/gists{/gist_id}","starred_url":"https://api.github.com/users/AndyOGo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndyOGo/subscriptions","organizations_url":"https://api.github.com/users/AndyOGo/orgs","repos_url":"https://api.github.com/users/AndyOGo/repos","events_url":"https://api.github.com/users/AndyOGo/events{/privacy}","received_events_url":"https://api.github.com/users/AndyOGo/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T18:49:23Z","updated_at":"2018-04-18T18:49:23Z","author_association":"NONE","body":"same issue for nanomorph https://github.com/choojs/nanomorph/issues/101"}}
{"actor":{"display_login":"AndyOGo"}}