{"action":"created","issue":{"url":"https://api.github.com/repos/Polymer/lit-html/issues/701","repository_url":"https://api.github.com/repos/Polymer/lit-html","labels_url":"https://api.github.com/repos/Polymer/lit-html/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/Polymer/lit-html/issues/701/comments","events_url":"https://api.github.com/repos/Polymer/lit-html/issues/701/events","html_url":"https://github.com/Polymer/lit-html/issues/701","id":391343217,"node_id":"MDU6SXNzdWUzOTEzNDMyMTc=","number":701,"title":"Custom element upgrading","user":{"login":"lastmjs","id":7000719,"node_id":"MDQ6VXNlcjcwMDA3MTk=","avatar_url":"https://avatars2.githubusercontent.com/u/7000719?v=4","gravatar_id":"","url":"https://api.github.com/users/lastmjs","html_url":"https://github.com/lastmjs","followers_url":"https://api.github.com/users/lastmjs/followers","following_url":"https://api.github.com/users/lastmjs/following{/other_user}","gists_url":"https://api.github.com/users/lastmjs/gists{/gist_id}","starred_url":"https://api.github.com/users/lastmjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lastmjs/subscriptions","organizations_url":"https://api.github.com/users/lastmjs/orgs","repos_url":"https://api.github.com/users/lastmjs/repos","events_url":"https://api.github.com/users/lastmjs/events{/privacy}","received_events_url":"https://api.github.com/users/lastmjs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-15T04:27:27Z","updated_at":"2018-12-15T05:04:49Z","closed_at":null,"author_association":"NONE","body":"What happens when custom elements get upgraded after the template they are in has already been rendered with some props? I believe I'm experiencing behavior where the properties on an upgraded custom element are not getting set after the upgrade. I'm working on a small reproducible example that I can share, but the basic gist is that I have a custom element that has not been upgraded as part of the initial template render, and I use a dynamic import to load the module that contains the custom element definition. After the element is upgraded, the properties that were supposed to be bound do not call the setter. I have a setter on the custom element that is never set by lit-html."},"comment":{"url":"https://api.github.com/repos/Polymer/lit-html/issues/comments/447538004","html_url":"https://github.com/Polymer/lit-html/issues/701#issuecomment-447538004","issue_url":"https://api.github.com/repos/Polymer/lit-html/issues/701","id":447538004,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NzUzODAwNA==","user":{"login":"justinfagnani","id":522948,"node_id":"MDQ6VXNlcjUyMjk0OA==","avatar_url":"https://avatars0.githubusercontent.com/u/522948?v=4","gravatar_id":"","url":"https://api.github.com/users/justinfagnani","html_url":"https://github.com/justinfagnani","followers_url":"https://api.github.com/users/justinfagnani/followers","following_url":"https://api.github.com/users/justinfagnani/following{/other_user}","gists_url":"https://api.github.com/users/justinfagnani/gists{/gist_id}","starred_url":"https://api.github.com/users/justinfagnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinfagnani/subscriptions","organizations_url":"https://api.github.com/users/justinfagnani/orgs","repos_url":"https://api.github.com/users/justinfagnani/repos","events_url":"https://api.github.com/users/justinfagnani/events{/privacy}","received_events_url":"https://api.github.com/users/justinfagnani/received_events","type":"User","site_admin":false},"created_at":"2018-12-15T05:04:48Z","updated_at":"2018-12-15T05:04:48Z","author_association":"COLLABORATOR","body":"Lit-html doesn't do anything special with properties, just sets them.\r\n\r\nThe problem you're seeing is happening because the setter is on the prototype and shadowed by the instance property. When you set the property again, just the instance property is updated, the setter isn't used. I think you'll find that the property is updated, you just don't see the setter being triggered.\r\n\r\nThe solution is to read off instance properties in the constructor, delete them, then re-assign them so that they'll go through the setters. This is what PolymerElement and LitElement do."}}
{"actor":{"display_login":"justinfagnani"}}