{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/polymer/issues/1180","labels_url":"https://api.github.com/repos/Polymer/polymer/issues/1180/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/polymer/issues/1180/comments","events_url":"https://api.github.com/repos/Polymer/polymer/issues/1180/events","html_url":"https://github.com/Polymer/polymer/issues/1180","id":57258121,"number":1180,"title":"Initialization might fail when surrounded by p-element","user":{"login":"ItsAsbreuk","id":1872843,"avatar_url":"https://avatars.githubusercontent.com/u/1872843?v=3","gravatar_id":"","url":"https://api.github.com/users/ItsAsbreuk","html_url":"https://github.com/ItsAsbreuk","followers_url":"https://api.github.com/users/ItsAsbreuk/followers","following_url":"https://api.github.com/users/ItsAsbreuk/following{/other_user}","gists_url":"https://api.github.com/users/ItsAsbreuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ItsAsbreuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ItsAsbreuk/subscriptions","organizations_url":"https://api.github.com/users/ItsAsbreuk/orgs","repos_url":"https://api.github.com/users/ItsAsbreuk/repos","events_url":"https://api.github.com/users/ItsAsbreuk/events{/privacy}","received_events_url":"https://api.github.com/users/ItsAsbreuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-11T00:05:18Z","updated_at":"2015-02-24T16:08:33Z","closed_at":null,"body":"There is a strange issue we've encountered during development of our own custom elements. Not polymer, but it also seems to hit `Polymer` elements.\r\n\r\nWhenever a customelement is wrapped inside a `p`-element, **initialization might fail**.\r\n\r\nWhile reading the innerHTML of a custom-element -on initialization-, the dom seems to do a miscalculation on some child-elements. That is: some childNodes might be missing. It depends on what type of child-element is within: not all fail... `div` does and `fieldset` fails. And when it encounters an `unprocessable` element, the rest of the content is disregarded. So, you could end up with a \"partial\" inner-content.\r\n\r\nThis [jsbin](http://jsbin.com/wigaraweju/2/) shows when the dom fails to see some child-elements --> look at the console to find out that the 3th element seems to be empty. It inspects innerHTML, but inspecting the childNodes gives the same result. And all browsers seem to act the same.\r\n\r\nFor now, we changed the design-setup for our custom elements to accept only `comment`-nodes inside their definition. Something like this:\r\n```html\r\n<p>\r\n<my-element><!--\r\n      <div>Front</div>\r\n      <div>Back</div>\r\n--> </my-element>\r\n</p>\r\n```\r\nAnd use a html-parser to create true nodes from the read comment-node, which is processed further.\r\n\r\nEven though i'm not using Polymer, it would be great if you guys know what's going on and find a solution. \r\n\r\nThx,\r\n\r\nMarco Asbreuk"},"comment":{"url":"https://api.github.com/repos/Polymer/polymer/issues/comments/75785597","html_url":"https://github.com/Polymer/polymer/issues/1180#issuecomment-75785597","issue_url":"https://api.github.com/repos/Polymer/polymer/issues/1180","id":75785597,"user":{"login":"miztroh","id":2515209,"avatar_url":"https://avatars.githubusercontent.com/u/2515209?v=3","gravatar_id":"","url":"https://api.github.com/users/miztroh","html_url":"https://github.com/miztroh","followers_url":"https://api.github.com/users/miztroh/followers","following_url":"https://api.github.com/users/miztroh/following{/other_user}","gists_url":"https://api.github.com/users/miztroh/gists{/gist_id}","starred_url":"https://api.github.com/users/miztroh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miztroh/subscriptions","organizations_url":"https://api.github.com/users/miztroh/orgs","repos_url":"https://api.github.com/users/miztroh/repos","events_url":"https://api.github.com/users/miztroh/events{/privacy}","received_events_url":"https://api.github.com/users/miztroh/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T16:08:33Z","updated_at":"2015-02-24T16:08:33Z","body":"@ItsAsbreuk If page HTML against the spec (especially when there's consistency among browser implementation of said spec), its authors should be prepared for the end result to differ from the desired output.  You can only go so far to protect people from themselves ;)"}}