Merge pull request #2406 from sveltejs/gh-2399

skip observedAttributes where appropriate
pull/2411/head
Rich Harris 6 years ago committed by GitHub
commit 1de67e3c84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -464,9 +464,10 @@ export default function dom(
} }
} }
${props.length > 0 && deindent`
static get observedAttributes() { static get observedAttributes() {
return ${JSON.stringify(props.map(x => x.export_name))}; return ${JSON.stringify(props.map(x => x.export_name))};
} }`}
${body.length > 0 && body.join('\n\n')} ${body.length > 0 && body.join('\n\n')}
} }

@ -49,10 +49,6 @@ class Component extends SvelteElement {
} }
} }
} }
static get observedAttributes() {
return [];
}
} }
customElements.define("custom-element", Component); customElements.define("custom-element", Component);

Loading…
Cancel
Save