push
github
246 of 1750 branches covered (14.06%)
2 of 2 new or added lines in 1 file covered. (100.0%)
1770 existing lines in 27 files now uncovered.443 of 2213 relevant lines covered (20.02%)
0.86 hits per line
1 |
export default function render(fn, useShadow) { |
|
UNCOV
2
|
return {
|
× |
3 |
get: useShadow
|
|
4 |
? (host) => { |
|
UNCOV
5
|
const updateDOM = fn(host); |
× |
6 |
const target = |
|
UNCOV
7
|
host.shadowRoot || |
|
8 |
host.attachShadow({ |
|
9 |
mode: "open", |
|
10 |
delegatesFocus: fn.delegatesFocus || false, |
|
11 |
}); |
|
UNCOV
12
|
return () => {
|
× |
UNCOV
13
|
updateDOM(host, target); |
× |
UNCOV
14
|
return target;
|
× |
15 |
}; |
|
16 |
} |
|
17 |
: (host) => { |
|
UNCOV
18
|
const updateDOM = fn(host); |
× |
UNCOV
19
|
return () => {
|
× |
UNCOV
20
|
updateDOM(host, host); |
× |
UNCOV
21
|
return host;
|
× |
22 |
}; |
|
23 |
}, |
|
24 |
observe(host, flush) { |
|
UNCOV
25
|
flush(); |
× |
26 |
}, |
|
27 |
}; |
|
28 |
} |