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/css-shadow-dom-keyframes/expected.js

56 lines
913 B

/* generated by Svelte vX.Y.Z */
6 years ago
import {
SvelteElement,
detach,
element,
init,
insert,
noop,
safe_not_equal
} from "svelte/internal";
function create_fragment(ctx) {
var div;
return {
7 years ago
c() {
6 years ago
div = element("div");
div.textContent = "fades in";
this.c = noop;
},
7 years ago
m(target, anchor) {
insert(target, div, anchor);
},
p: noop,
i: noop,
o: noop,
6 years ago
d(detaching) {
if (detaching) {
detach(div);
7 years ago
}
}
};
}
class Component extends SvelteElement {
constructor(options) {
super();
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
6 years ago
init(this, { target: this.shadowRoot }, null, create_fragment, safe_not_equal, []);
if (options) {
if (options.target) {
insert(options.target, this, options.anchor);
}
}
}
}
customElements.define("custom-element", Component);
export default Component;