{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/lit-element/issues/90","repository_url":"https://api.github.com/repos/Polymer/lit-element","labels_url":"https://api.github.com/repos/Polymer/lit-element/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/lit-element/issues/90/comments","events_url":"https://api.github.com/repos/Polymer/lit-element/issues/90/events","html_url":"https://github.com/Polymer/lit-element/issues/90","id":330921914,"node_id":"MDU6SXNzdWUzMzA5MjE5MTQ=","number":90,"title":"Setting innerHTML leads to total meltdown","user":{"login":"positlabs","id":1918844,"node_id":"MDQ6VXNlcjE5MTg4NDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1918844?v=4","gravatar_id":"","url":"https://api.github.com/users/positlabs","html_url":"https://github.com/positlabs","followers_url":"https://api.github.com/users/positlabs/followers","following_url":"https://api.github.com/users/positlabs/following{/other_user}","gists_url":"https://api.github.com/users/positlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/positlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/positlabs/subscriptions","organizations_url":"https://api.github.com/users/positlabs/orgs","repos_url":"https://api.github.com/users/positlabs/repos","events_url":"https://api.github.com/users/positlabs/events{/privacy}","received_events_url":"https://api.github.com/users/positlabs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-09T21:53:17Z","updated_at":"2018-06-13T23:01:38Z","closed_at":null,"author_association":"NONE","body":"I'm making a simple control panel with some sub-components (checkboxes, sliders, etc). In one of the components, I was clearing out the contents of the element by setting `this.innerHTML = ''` in the constructor. All seemed fine until I realized that it was doing some crazy stuff to all of the subsequent components. Strange things like id attribute being removed, click handlers not being assigned to the correct elements, and properties not being set.\r\n\r\nIt was really difficult to debug since the symptoms were seemingly random. I wonder if there is a way to `console.warn` people against doing this. "},"comment":{"url":"https://api.github.com/repos/Polymer/lit-element/issues/comments/397114921","html_url":"https://github.com/Polymer/lit-element/issues/90#issuecomment-397114921","issue_url":"https://api.github.com/repos/Polymer/lit-element/issues/90","id":397114921,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzExNDkyMQ==","user":{"login":"positlabs","id":1918844,"node_id":"MDQ6VXNlcjE5MTg4NDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1918844?v=4","gravatar_id":"","url":"https://api.github.com/users/positlabs","html_url":"https://github.com/positlabs","followers_url":"https://api.github.com/users/positlabs/followers","following_url":"https://api.github.com/users/positlabs/following{/other_user}","gists_url":"https://api.github.com/users/positlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/positlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/positlabs/subscriptions","organizations_url":"https://api.github.com/users/positlabs/orgs","repos_url":"https://api.github.com/users/positlabs/repos","events_url":"https://api.github.com/users/positlabs/events{/privacy}","received_events_url":"https://api.github.com/users/positlabs/received_events","type":"User","site_admin":false},"created_at":"2018-06-13T23:01:38Z","updated_at":"2018-06-13T23:01:38Z","author_association":"NONE","body":"@sorvell that's good to know, thanks! Maybe a better (safer) approach is to pop all of the initial child nodes into a document fragment, and use that? I'm curious about what the best option is for this. Seems like a use-case that would be fairly common.\r\n\r\nHowever, the issue I had was with setting innerHTML in the constructor, not in the rendering of it. If I have some time I can try creating a more complete test case."}}
{"actor":{"display_login":"positlabs"}}