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

70 lines
1.3 KiB

/* generated by Svelte vX.Y.Z */
import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode, flush, init, insert, noop, safe_not_equal, setData } from "svelte/internal";
function add_css() {
var style = createElement("style");
style.id = 'svelte-1a7i8ec-style';
style.textContent = "p.svelte-1a7i8ec{color:red}";
append(document.head, style);
}
8 years ago
function create_fragment(ctx) {
var p, text;
return {
7 years ago
c() {
p = createElement("p");
text = createText(ctx.foo);
p.className = "svelte-1a7i8ec";
},
7 years ago
m(target, anchor) {
insert(target, p, anchor);
append(p, text);
},
7 years ago
p(changed, ctx) {
if (changed.foo) {
setData(text, ctx.foo);
}
},
i: noop,
o: noop,
7 years ago
d(detach) {
if (detach) {
detachNode(p);
}
}
};
}
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 SvelteComponent extends SvelteComponent_1 {
constructor(options) {
super();
if (!document.getElementById("svelte-1a7i8ec-style")) add_css();
init(this, options, instance, create_fragment, safe_not_equal);
}
get foo() {
return this.$$.ctx.foo;
}
8 years ago
set foo(foo) {
this.$set({ foo });
flush();
8 years ago
}
}
export default SvelteComponent;