{"action":"opened","issue":{"url":"https://api.github.com/repos/jquery/sizzle/issues/357","labels_url":"https://api.github.com/repos/jquery/sizzle/issues/357/labels{/name}","comments_url":"https://api.github.com/repos/jquery/sizzle/issues/357/comments","events_url":"https://api.github.com/repos/jquery/sizzle/issues/357/events","html_url":"https://github.com/jquery/sizzle/issues/357","id":109696721,"number":357,"title":"elem.getAttribute( name ) not working with Document Fragment","user":{"login":"h7896v7347","id":1020390,"avatar_url":"https://avatars.githubusercontent.com/u/1020390?v=3","gravatar_id":"","url":"https://api.github.com/users/h7896v7347","html_url":"https://github.com/h7896v7347","followers_url":"https://api.github.com/users/h7896v7347/followers","following_url":"https://api.github.com/users/h7896v7347/following{/other_user}","gists_url":"https://api.github.com/users/h7896v7347/gists{/gist_id}","starred_url":"https://api.github.com/users/h7896v7347/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h7896v7347/subscriptions","organizations_url":"https://api.github.com/users/h7896v7347/orgs","repos_url":"https://api.github.com/users/h7896v7347/repos","events_url":"https://api.github.com/users/h7896v7347/events{/privacy}","received_events_url":"https://api.github.com/users/h7896v7347/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-04T18:52:21Z","updated_at":"2015-10-04T18:52:21Z","closed_at":null,"body":"In connection with VueJS Router + uikit JS, \r\nwhen Route is changed, after click trigger **inside** destroyed Document Fragment\r\n\r\n**Uncaught TypeError: elem.getAttribute is not a function**\r\nis shown on line https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L915 \r\n\r\nelem \r\n``#document-fragment\r\nbaseURI: null\r\nchildElementCount: 1\r\nchildNodes: NodeList[4]\r\nchildren: HTMLCollection[1]\r\nfirstChild: comment\r\nfirstElementChild: div.tm-full-width\r\nlastChild: comment\r\nlastElementChild: div.tm-full-width\r\nlocalName: null\r\nnamespaceURI: null\r\nnextSibling: null\r\nnodeName: \"#document-fragment\"\r\nnodeType: 11\r\nnodeValue: null\r\nownerDocument: document\r\nparentElement: null\r\nparentNode: null\r\npreviousSibling: null\r\ntextContent: \"↵ ↵↵ \r\n__proto__: DocumentFragment``\r\n\r\n\r\n**Adding \"dirty fix\"**\r\n\r\n``if(elem.nodeName == \"#document-fragment\")\r\n\t\t {\r\n\t\t \telem = elem.firstElementChild ;\r\n\t\t }``\r\nbefore\r\n``return val !== undefined ?``\r\nseems to fix it, but i don't think this is the best solution. \r\n"}}