You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/js/samples/inline-style-unoptimized/expected.js

73 lines
1.5 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponent,
6 years ago
detach,
element,
init,
insert,
noop,
safe_not_equal,
space
6 years ago
} from "svelte/internal";
function create_fragment(ctx) {
6 years ago
var div0, t, div1, div1_style_value;
return {
6 years ago
c() {
6 years ago
div0 = element("div");
t = space();
6 years ago
div1 = element("div");
div0.style.cssText = ctx.style;
div1.style.cssText = div1_style_value = "" + ctx.key + ": " + ctx.value;
},
6 years ago
m(target, anchor) {
insert(target, div0, anchor);
6 years ago
insert(target, t, anchor);
insert(target, div1, anchor);
},
6 years ago
p(changed, ctx) {
if (changed.style) {
div0.style.cssText = ctx.style;
}
if ((changed.key || changed.value) && div1_style_value !== (div1_style_value = "" + ctx.key + ": " + ctx.value)) {
div1.style.cssText = div1_style_value;
}
},
i: noop,
o: noop,
6 years ago
d(detaching) {
if (detaching) {
detach(div0);
detach(t);
detach(div1);
6 years ago
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { style, key, value } = $$props;
6 years ago
$$self.$set = $$props => {
if ('style' in $$props) $$invalidate('style', style = $$props.style);
if ('key' in $$props) $$invalidate('key', key = $$props.key);
if ('value' in $$props) $$invalidate('value', value = $$props.value);
};
return { style, key, value };
}
class Component extends SvelteComponent {
constructor(options) {
super();
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["style", "key", "value"]);
}
}
export default Component;