mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-08-01 00:00:15 +02:00
🐛 Node in enviroment
This commit is contained in:
@@ -14,6 +14,7 @@ export const enviroment= {
|
||||
setDeleteAttr,
|
||||
ssr: "",
|
||||
D: globalThis.document,
|
||||
N: globalThis.Node,
|
||||
F: globalThis.DocumentFragment,
|
||||
H: globalThis.HTMLElement,
|
||||
S: globalThis.SVGElement,
|
||||
|
@@ -167,9 +167,9 @@ function connectionsChangesObserverConstructor(){
|
||||
if(store.size > 30)//TODO?: limit
|
||||
await requestIdle();
|
||||
const out= [];
|
||||
if(!isInstance(element, Node)) return out;
|
||||
if(!isInstance(element, env.N)) return out;
|
||||
for(const el of store.keys()){
|
||||
if(el===element || !isInstance(el, Node)) continue;
|
||||
if(el===element || !isInstance(el, env.N)) continue;
|
||||
if(element.contains(el))
|
||||
out.push(el);
|
||||
}
|
||||
|
Reference in New Issue
Block a user