|
|
@ -475,9 +475,11 @@ export default function dom(
|
|
|
|
constructor(options) {
|
|
|
|
constructor(options) {
|
|
|
|
super();
|
|
|
|
super();
|
|
|
|
|
|
|
|
|
|
|
|
${css.code && b`this.shadowRoot.innerHTML = \`<style>${css.code.replace(/\\/g, '\\\\')}${options.dev ? `\n/*# sourceMappingURL=${css.map.toUrl()} */` : ''}</style>\`;`}
|
|
|
|
const add_css = ${css.code
|
|
|
|
|
|
|
|
? (b`() => this.shadowRoot.innerHTML = \`<style>${css.code.replace(/\\/g, '\\\\')}${options.dev ? `\n/*# sourceMappingURL=${css.map.toUrl()} */` : ''}</style>\`;`)
|
|
|
|
|
|
|
|
: x`@noop`}
|
|
|
|
|
|
|
|
|
|
|
|
@init(this, { target: this.shadowRoot, props: @attribute_to_object(this.attributes) }, ${definition}, ${has_create_fragment ? 'create_fragment': 'null'}, ${not_equal}, ${prop_indexes}, null, ${dirty});
|
|
|
|
@init(this, { target: this.shadowRoot, props: @attribute_to_object(this.attributes) }, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${add_css}, ${dirty});
|
|
|
|
|
|
|
|
|
|
|
|
${dev_props_check}
|
|
|
|
${dev_props_check}
|
|
|
|
|
|
|
|
|
|
|
@ -528,7 +530,7 @@ export default function dom(
|
|
|
|
class ${name} extends ${superclass} {
|
|
|
|
class ${name} extends ${superclass} {
|
|
|
|
constructor(options) {
|
|
|
|
constructor(options) {
|
|
|
|
super(${options.dev && 'options'});
|
|
|
|
super(${options.dev && 'options'});
|
|
|
|
@init(this, options, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${should_add_css ? add_css : null}, ${dirty});
|
|
|
|
@init(this, options, ${definition}, ${has_create_fragment ? 'create_fragment' : 'null'}, ${not_equal}, ${prop_indexes}, ${should_add_css ? add_css : x`@noop`}, ${dirty});
|
|
|
|
${options.dev && b`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name.name}", options, id: create_fragment.name });`}
|
|
|
|
${options.dev && b`@dispatch_dev("SvelteRegisterComponent", { component: this, tagName: "${name.name}", options, id: create_fragment.name });`}
|
|
|
|
|
|
|
|
|
|
|
|
${dev_props_check}
|
|
|
|
${dev_props_check}
|
|
|
|