{"action":"created","issue":{"url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/145","labels_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/145/comments","events_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/145/events","html_url":"https://github.com/webcomponents/webcomponentsjs/issues/145","id":53324751,"number":145,"title":"the Node.normalize does not remove the empty text nodes using the polyfill","user":{"login":"eeid26","id":5051095,"avatar_url":"https://avatars.githubusercontent.com/u/5051095?v=3","gravatar_id":"","url":"https://api.github.com/users/eeid26","html_url":"https://github.com/eeid26","followers_url":"https://api.github.com/users/eeid26/followers","following_url":"https://api.github.com/users/eeid26/following{/other_user}","gists_url":"https://api.github.com/users/eeid26/gists{/gist_id}","starred_url":"https://api.github.com/users/eeid26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeid26/subscriptions","organizations_url":"https://api.github.com/users/eeid26/orgs","repos_url":"https://api.github.com/users/eeid26/repos","events_url":"https://api.github.com/users/eeid26/events{/privacy}","received_events_url":"https://api.github.com/users/eeid26/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/webcomponents/webcomponentsjs/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"azakus","id":46725,"avatar_url":"https://avatars.githubusercontent.com/u/46725?v=3","gravatar_id":"","url":"https://api.github.com/users/azakus","html_url":"https://github.com/azakus","followers_url":"https://api.github.com/users/azakus/followers","following_url":"https://api.github.com/users/azakus/following{/other_user}","gists_url":"https://api.github.com/users/azakus/gists{/gist_id}","starred_url":"https://api.github.com/users/azakus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azakus/subscriptions","organizations_url":"https://api.github.com/users/azakus/orgs","repos_url":"https://api.github.com/users/azakus/repos","events_url":"https://api.github.com/users/azakus/events{/privacy}","received_events_url":"https://api.github.com/users/azakus/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-01-04T04:18:50Z","updated_at":"2015-01-21T21:33:21Z","closed_at":"2015-01-20T19:48:05Z","body":"Hi,\r\n\r\nI am not sure if I missed something or not ?   \r\n\r\nI ran the following code with webcomponents.js (version: 0.5.1-1 ) and I did not get the correct results by calling the polyfill normalize. I had to use unwrap to get the correct results.\r\n\r\n        var div = document.createElement(\"div\");\r\n        div.appendChild(document.createTextNode(\"\"));\r\n        div.appendChild(document.createTextNode(\"\"));\r\n        div.appendChild(document.createTextNode(\"\"));\r\n        var childDiv = document.createElement(\"div\");\r\n        childDiv.appendChild(document.createTextNode(\"\"));\r\n        childDiv.appendChild(document.createTextNode(\"\"));\r\n        div.appendChild(childDiv);\r\n\r\n        console.log(\"parentDiv before normalize:\",div.childNodes.length);\r\n        console.log(\"childDiv before normalize:\",childDiv.childNodes.length);\r\n\r\n        // calling the polyfill normalize will not remove the empty textNodes\r\n        //div.normalize();\r\n        //console.log(\"parentDiv after polyfill normalize:\",div.childNodes.length);\r\n        //console.log(\"childDiv after polyfill normalize:\",childDiv.childNodes.length);\r\n\r\n        unwrap(div).normalize();\r\n        // the parentDiv should have 1 child and the childDiv should be 0\r\n        console.log(\"parentDiv after unwrap normalize:\",div.childNodes.length);\r\n        console.log(\"childDiv after unwrap normalize:\",childDiv.childNodes.length);\r\n\r\nThank you\r\n"},"comment":{"url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/comments/70926102","html_url":"https://github.com/webcomponents/webcomponentsjs/issues/145#issuecomment-70926102","issue_url":"https://api.github.com/repos/webcomponents/webcomponentsjs/issues/145","id":70926102,"user":{"login":"eeid26","id":5051095,"avatar_url":"https://avatars.githubusercontent.com/u/5051095?v=3","gravatar_id":"","url":"https://api.github.com/users/eeid26","html_url":"https://github.com/eeid26","followers_url":"https://api.github.com/users/eeid26/followers","following_url":"https://api.github.com/users/eeid26/following{/other_user}","gists_url":"https://api.github.com/users/eeid26/gists{/gist_id}","starred_url":"https://api.github.com/users/eeid26/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eeid26/subscriptions","organizations_url":"https://api.github.com/users/eeid26/orgs","repos_url":"https://api.github.com/users/eeid26/repos","events_url":"https://api.github.com/users/eeid26/events{/privacy}","received_events_url":"https://api.github.com/users/eeid26/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T21:33:21Z","updated_at":"2015-01-21T21:33:21Z","body":"Thank you"}}