forked from sveltejs/svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpected.js
86 lines (72 loc) · 1.67 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* generated by Svelte vX.Y.Z */
import {
SvelteComponent,
append,
detach,
element,
init,
insert,
noop,
safe_not_equal
} from "svelte/internal";
function create_fragment(ctx) {
var select, option0, option1, select_value_value;
return {
c() {
select = element("select");
option0 = element("option");
option0.textContent = "1";
option1 = element("option");
option1.textContent = "2";
option0.__value = "1";
option0.value = option0.__value;
option1.__value = "2";
option1.value = option1.__value;
},
m(target, anchor) {
insert(target, select, anchor);
append(select, option0);
append(select, option1);
select_value_value = ctx.current;
for (var i = 0; i < select.options.length; i += 1) {
var option = select.options[i];
if (option.__value === select_value_value) {
option.selected = true;
break;
}
}
},
p(changed, ctx) {
if ((changed.current) && select_value_value !== (select_value_value = ctx.current)) {
for (var i = 0; i < select.options.length; i += 1) {
var option = select.options[i];
if (option.__value === select_value_value) {
option.selected = true;
break;
}
}
}
},
i: noop,
o: noop,
d(detaching) {
if (detaching) {
detach(select);
}
}
};
}
function instance($$self, $$props, $$invalidate) {
let { current } = $$props;
$$self.$set = $$props => {
if ('current' in $$props) $$invalidate('current', current = $$props.current);
};
return { current };
}
class Component extends SvelteComponent {
constructor(options) {
super();
init(this, options, instance, create_fragment, safe_not_equal, ["current"]);
}
}
export default Component;