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/deconflict-builtins/expected.js

133 lines
2.4 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponent,
6 years ago
append,
destroy_each,
detach,
element,
empty,
6 years ago
init,
insert,
noop,
safe_not_equal,
set_data,
text
} from "svelte/internal";
function get_each_context(ctx, list, i) {
const child_ctx = Object.create(ctx);
child_ctx.node = list[i];
return child_ctx;
}
// (5:0) {#each createElement as node}
function create_each_block(ctx) {
6 years ago
var span, t_value = ctx.node, t;
return {
c() {
6 years ago
span = element("span");
t = text(t_value);
},
m(target, anchor) {
insert(target, span, anchor);
6 years ago
append(span, t);
},
p(changed, ctx) {
6 years ago
if ((changed.createElement) && t_value !== (t_value = ctx.node)) {
set_data(t, t_value);
}
},
6 years ago
d(detaching) {
if (detaching) {
detach(span);
}
}
};
}
function create_fragment(ctx) {
6 years ago
var each_1_anchor;
var each_value = ctx.createElement;
var each_blocks = [];
for (var i = 0; i < each_value.length; i += 1) {
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
}
return {
6 years ago
c() {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].c();
}
each_1_anchor = empty();
},
6 years ago
m(target, anchor) {
for (var i = 0; i < each_blocks.length; i += 1) {
each_blocks[i].m(target, anchor);
}
6 years ago
insert(target, each_1_anchor, anchor);
},
6 years ago
p(changed, ctx) {
if (changed.createElement) {
each_value = ctx.createElement;
for (var i = 0; i < each_value.length; i += 1) {
const child_ctx = get_each_context(ctx, each_value, i);
if (each_blocks[i]) {
each_blocks[i].p(changed, child_ctx);
} else {
each_blocks[i] = create_each_block(child_ctx);
each_blocks[i].c();
6 years ago
each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor);
}
}
for (; i < each_blocks.length; i += 1) {
6 years ago
each_blocks[i].d(1);
}
each_blocks.length = each_value.length;
}
},
i: noop,
o: noop,
6 years ago
d(detaching) {
destroy_each(each_blocks, detaching);
6 years ago
if (detaching) {
detach(each_1_anchor);
6 years ago
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { createElement } = $$props;
6 years ago
$$self.$set = $$props => {
if ('createElement' in $$props) $$invalidate('createElement', createElement = $$props.createElement);
};
return { createElement };
}
class Component extends SvelteComponent {
constructor(options) {
super();
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["createElement"]);
}
}
export default Component;