-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
Copy pathexpected.js
62 lines (56 loc) · 1.01 KB
/
expected.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* generated by Svelte vX.Y.Z */
import {
SvelteElement,
attribute_to_object,
detach,
element,
init,
insert,
noop,
safe_not_equal
} from "svelte/internal";
function create_fragment(ctx) {
let div;
return {
c() {
div = element("div");
div.textContent = "fades in";
this.c = noop;
},
m(target, anchor) {
insert(target, div, anchor);
},
p: noop,
i: noop,
o: noop,
d(detaching) {
if (detaching) detach(div);
}
};
}
class Component extends SvelteElement {
constructor(options) {
super();
this.shadowRoot.innerHTML = `<style>div{animation:foo 1s}@keyframes foo{0%{opacity:0}100%{opacity:1}}</style>`;
init(
this,
{
target: this.shadowRoot,
props: attribute_to_object(this.attributes),
customElement: true
},
null,
create_fragment,
safe_not_equal,
{},
null
);
if (options) {
if (options.target) {
insert(options.target, this, options.anchor);
}
}
}
}
customElements.define("custom-element", Component);
export default Component;