mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-06 21:47:06 +02:00
🐛 Node in enviroment
This commit is contained in:
parent
ee7fe43369
commit
bc2398a005
5
dist/esm-with-signals.js
vendored
5
dist/esm-with-signals.js
vendored
@ -91,6 +91,7 @@ var enviroment = {
|
|||||||
setDeleteAttr,
|
setDeleteAttr,
|
||||||
ssr: "",
|
ssr: "",
|
||||||
D: globalThis.document,
|
D: globalThis.document,
|
||||||
|
N: globalThis.Node,
|
||||||
F: globalThis.DocumentFragment,
|
F: globalThis.DocumentFragment,
|
||||||
H: globalThis.HTMLElement,
|
H: globalThis.HTMLElement,
|
||||||
S: globalThis.SVGElement,
|
S: globalThis.SVGElement,
|
||||||
@ -231,9 +232,9 @@ function connectionsChangesObserverConstructor() {
|
|||||||
if (store.size > 30)
|
if (store.size > 30)
|
||||||
await requestIdle();
|
await requestIdle();
|
||||||
const out = [];
|
const out = [];
|
||||||
if (!isInstance(element, Node)) return out;
|
if (!isInstance(element, enviroment.N)) return out;
|
||||||
for (const el of store.keys()) {
|
for (const el of store.keys()) {
|
||||||
if (el === element || !isInstance(el, Node)) continue;
|
if (el === element || !isInstance(el, enviroment.N)) continue;
|
||||||
if (element.contains(el))
|
if (element.contains(el))
|
||||||
out.push(el);
|
out.push(el);
|
||||||
}
|
}
|
||||||
|
4
dist/esm-with-signals.min.js
vendored
4
dist/esm-with-signals.min.js
vendored
File diff suppressed because one or more lines are too long
5
dist/esm.js
vendored
5
dist/esm.js
vendored
@ -58,6 +58,7 @@ var enviroment = {
|
|||||||
setDeleteAttr,
|
setDeleteAttr,
|
||||||
ssr: "",
|
ssr: "",
|
||||||
D: globalThis.document,
|
D: globalThis.document,
|
||||||
|
N: globalThis.Node,
|
||||||
F: globalThis.DocumentFragment,
|
F: globalThis.DocumentFragment,
|
||||||
H: globalThis.HTMLElement,
|
H: globalThis.HTMLElement,
|
||||||
S: globalThis.SVGElement,
|
S: globalThis.SVGElement,
|
||||||
@ -198,9 +199,9 @@ function connectionsChangesObserverConstructor() {
|
|||||||
if (store.size > 30)
|
if (store.size > 30)
|
||||||
await requestIdle();
|
await requestIdle();
|
||||||
const out = [];
|
const out = [];
|
||||||
if (!isInstance(element, Node)) return out;
|
if (!isInstance(element, enviroment.N)) return out;
|
||||||
for (const el of store.keys()) {
|
for (const el of store.keys()) {
|
||||||
if (el === element || !isInstance(el, Node)) continue;
|
if (el === element || !isInstance(el, enviroment.N)) continue;
|
||||||
if (element.contains(el))
|
if (element.contains(el))
|
||||||
out.push(el);
|
out.push(el);
|
||||||
}
|
}
|
||||||
|
2
dist/esm.min.js
vendored
2
dist/esm.min.js
vendored
File diff suppressed because one or more lines are too long
5
dist/iife-with-signals.js
vendored
5
dist/iife-with-signals.js
vendored
@ -136,6 +136,7 @@ var DDE = (() => {
|
|||||||
setDeleteAttr,
|
setDeleteAttr,
|
||||||
ssr: "",
|
ssr: "",
|
||||||
D: globalThis.document,
|
D: globalThis.document,
|
||||||
|
N: globalThis.Node,
|
||||||
F: globalThis.DocumentFragment,
|
F: globalThis.DocumentFragment,
|
||||||
H: globalThis.HTMLElement,
|
H: globalThis.HTMLElement,
|
||||||
S: globalThis.SVGElement,
|
S: globalThis.SVGElement,
|
||||||
@ -276,9 +277,9 @@ var DDE = (() => {
|
|||||||
if (store.size > 30)
|
if (store.size > 30)
|
||||||
await requestIdle();
|
await requestIdle();
|
||||||
const out = [];
|
const out = [];
|
||||||
if (!isInstance(element, Node)) return out;
|
if (!isInstance(element, enviroment.N)) return out;
|
||||||
for (const el of store.keys()) {
|
for (const el of store.keys()) {
|
||||||
if (el === element || !isInstance(el, Node)) continue;
|
if (el === element || !isInstance(el, enviroment.N)) continue;
|
||||||
if (element.contains(el))
|
if (element.contains(el))
|
||||||
out.push(el);
|
out.push(el);
|
||||||
}
|
}
|
||||||
|
6
dist/iife-with-signals.min.js
vendored
6
dist/iife-with-signals.min.js
vendored
File diff suppressed because one or more lines are too long
5
dist/iife.js
vendored
5
dist/iife.js
vendored
@ -100,6 +100,7 @@ var DDE = (() => {
|
|||||||
setDeleteAttr,
|
setDeleteAttr,
|
||||||
ssr: "",
|
ssr: "",
|
||||||
D: globalThis.document,
|
D: globalThis.document,
|
||||||
|
N: globalThis.Node,
|
||||||
F: globalThis.DocumentFragment,
|
F: globalThis.DocumentFragment,
|
||||||
H: globalThis.HTMLElement,
|
H: globalThis.HTMLElement,
|
||||||
S: globalThis.SVGElement,
|
S: globalThis.SVGElement,
|
||||||
@ -240,9 +241,9 @@ var DDE = (() => {
|
|||||||
if (store.size > 30)
|
if (store.size > 30)
|
||||||
await requestIdle();
|
await requestIdle();
|
||||||
const out = [];
|
const out = [];
|
||||||
if (!isInstance(element, Node)) return out;
|
if (!isInstance(element, enviroment.N)) return out;
|
||||||
for (const el of store.keys()) {
|
for (const el of store.keys()) {
|
||||||
if (el === element || !isInstance(el, Node)) continue;
|
if (el === element || !isInstance(el, enviroment.N)) continue;
|
||||||
if (element.contains(el))
|
if (element.contains(el))
|
||||||
out.push(el);
|
out.push(el);
|
||||||
}
|
}
|
||||||
|
2
dist/iife.min.js
vendored
2
dist/iife.min.js
vendored
File diff suppressed because one or more lines are too long
3
jsdom.js
3
jsdom.js
@ -1,4 +1,3 @@
|
|||||||
//TODO: https://www.npmjs.com/package/html-element
|
|
||||||
import { enviroment as env } from './src/dom-common.js';
|
import { enviroment as env } from './src/dom-common.js';
|
||||||
env.ssr= " ssr";
|
env.ssr= " ssr";
|
||||||
|
|
||||||
@ -17,7 +16,7 @@ env.setDeleteAttr= function(obj, prop, value){
|
|||||||
if(value) return obj.setAttribute(prop, "");
|
if(value) return obj.setAttribute(prop, "");
|
||||||
obj.removeAttribute(prop);
|
obj.removeAttribute(prop);
|
||||||
};
|
};
|
||||||
const keys= { H: "HTMLElement", S: "SVGElement", F: "DocumentFragment", D: "document" };
|
const keys= { N: "Node", H: "HTMLElement", S: "SVGElement", F: "DocumentFragment", D: "document", M: "MutationObserver" };
|
||||||
let env_bk= {};
|
let env_bk= {};
|
||||||
let dom_last;
|
let dom_last;
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ export const enviroment= {
|
|||||||
setDeleteAttr,
|
setDeleteAttr,
|
||||||
ssr: "",
|
ssr: "",
|
||||||
D: globalThis.document,
|
D: globalThis.document,
|
||||||
|
N: globalThis.Node,
|
||||||
F: globalThis.DocumentFragment,
|
F: globalThis.DocumentFragment,
|
||||||
H: globalThis.HTMLElement,
|
H: globalThis.HTMLElement,
|
||||||
S: globalThis.SVGElement,
|
S: globalThis.SVGElement,
|
||||||
|
@ -167,9 +167,9 @@ function connectionsChangesObserverConstructor(){
|
|||||||
if(store.size > 30)//TODO?: limit
|
if(store.size > 30)//TODO?: limit
|
||||||
await requestIdle();
|
await requestIdle();
|
||||||
const out= [];
|
const out= [];
|
||||||
if(!isInstance(element, Node)) return out;
|
if(!isInstance(element, env.N)) return out;
|
||||||
for(const el of store.keys()){
|
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))
|
if(element.contains(el))
|
||||||
out.push(el);
|
out.push(el);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user