🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
22
node_modules/astro/dist/runtime/client/visible.js
generated
vendored
Normal file
22
node_modules/astro/dist/runtime/client/visible.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const visibleDirective = (load, _options, el) => {
|
||||
const cb = async () => {
|
||||
const hydrate = await load();
|
||||
await hydrate();
|
||||
};
|
||||
const io = new IntersectionObserver((entries) => {
|
||||
for (const entry of entries) {
|
||||
if (!entry.isIntersecting)
|
||||
continue;
|
||||
io.disconnect();
|
||||
cb();
|
||||
break;
|
||||
}
|
||||
});
|
||||
for (const child of el.children) {
|
||||
io.observe(child);
|
||||
}
|
||||
};
|
||||
var visible_default = visibleDirective;
|
||||
export {
|
||||
visible_default as default
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue