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/dont-use-dataset-in-svg/expected.js

66 lines
1.0 KiB

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteComponent,
6 years ago
append,
attr,
detach,
init,
insert,
noop,
safe_not_equal,
svg_element
} from "svelte/internal";
function create_fragment(ctx) {
var svg, g0, g1;
return {
6 years ago
c() {
6 years ago
svg = svg_element("svg");
g0 = svg_element("g");
g1 = svg_element("g");
attr(g0, "data-foo", "bar");
attr(g1, "data-foo", ctx.bar);
},
6 years ago
m(target, anchor) {
insert(target, svg, anchor);
append(svg, g0);
append(svg, g1);
},
6 years ago
p(changed, ctx) {
if (changed.bar) {
6 years ago
attr(g1, "data-foo", ctx.bar);
}
},
i: noop,
o: noop,
6 years ago
d(detaching) {
if (detaching) {
detach(svg);
6 years ago
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { bar } = $$props;
6 years ago
$$self.$set = $$props => {
if ('bar' in $$props) $$invalidate('bar', bar = $$props.bar);
};
return { bar };
}
class Component extends SvelteComponent {
constructor(options) {
super();
6 years ago
init(this, options, instance, create_fragment, safe_not_equal, ["bar"]);
}
}
export default Component;