develwoutacause’s avatardevelwoutacause’s Twitter Archive—№ 1,639

  1. Anyone ever seen a custom element upgrade which *deleted* existing properties on the element? I'm super-perplexed by this behavior, but unable to narrow it down. AFAICT, the upgrade itself is deleting these properties. Workaround is to define a getter/setter for some reason? 🤨
    1. …in reply to @develwoutacause
      Something like: const el = document.createElement('foo-bar'); el.prop = 'test'; customElements.define('foo-bar', class extends HTMLElement { constructor() { super(); console.log(this.prop); // undefined } });