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/collapses-text-around-comments/expected.js

72 lines
1.2 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponent,
6 years ago
append,
detach,
element,
init,
insert,
noop,
safe_not_equal,
set_data,
text
} from "svelte/internal";
function add_css() {
6 years ago
var style = element("style");
style.id = 'svelte-1a7i8ec-style';
style.textContent = "p.svelte-1a7i8ec{color:red}";
append(document.head, style);
}
8 years ago
function create_fragment(ctx) {
6 years ago
var p, t;
return {
7 years ago
c() {
6 years ago
p = element("p");
t = text(ctx.foo);
p.className = "svelte-1a7i8ec";
},
7 years ago
m(target, anchor) {
insert(target, p, anchor);
6 years ago
append(p, t);
},
7 years ago
p(changed, ctx) {
if (changed.foo) {
6 years ago
set_data(t, ctx.foo);
}
},
i: noop,
o: noop,
6 years ago
d(detaching) {
if (detaching) {
detach(p);
7 years ago
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { foo = 42 } = $$props;
6 years ago
$$self.$set = $$props => {
if ('foo' in $$props) $$invalidate('foo', foo = $$props.foo);
};
return { foo };
}
class Component extends SvelteComponent {
constructor(options) {
super();
if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["foo"]);
}
}
export default Component;