mount-observer 0.0.52 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MountObserver.js +38 -3
- package/MountObserver.ts +37 -3
- package/Newish.js +34 -38
- package/Newish.ts +34 -37
- package/RootMutObs.js +16 -0
- package/RootMutObs.ts +20 -2
- package/bindish.js +4 -4
- package/bindish.ts +5 -5
- package/package.json +1 -1
- package/ts-refs/mount-observer/types.d.ts +5 -1
- package/ts-refs/per-each/types.d.ts +2 -0
package/MountObserver.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RootMutObs } from './RootMutObs.js';
|
|
2
2
|
import { bindish, bindishIt } from './bindish.js';
|
|
3
3
|
export const guid = '5Pv6bHOVH0ae07opRZ8N/g';
|
|
4
|
-
const mutationObserverLookup = new WeakMap();
|
|
4
|
+
export const mutationObserverLookup = new WeakMap();
|
|
5
5
|
const refCount = new WeakMap();
|
|
6
6
|
export class MountObserver extends EventTarget {
|
|
7
7
|
#mountInit;
|
|
@@ -419,17 +419,52 @@ export class MountObserver extends EventTarget {
|
|
|
419
419
|
await this.#compose(elToMount, 0);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
await bindishIt(els, assigner);
|
|
422
|
+
await bindishIt(els, { assigner });
|
|
423
423
|
this.#mount(elsToMount, initializing);
|
|
424
424
|
}
|
|
425
425
|
async #inspectWithin(within, initializing) {
|
|
426
|
-
await bindish(within, this.#mountInit.assigner);
|
|
426
|
+
await bindish(within, { assigner: this.#mountInit.assigner });
|
|
427
427
|
await this.composeFragment(within, 0);
|
|
428
428
|
const match = await this.#selector();
|
|
429
429
|
const els = Array.from(within.querySelectorAll(match));
|
|
430
430
|
this.#filterAndMount(els, false, initializing);
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
+
export function waitForIdleNodes(nodes) {
|
|
434
|
+
return new Promise((resolve) => {
|
|
435
|
+
const mutObservers = [];
|
|
436
|
+
for (const node of nodes) {
|
|
437
|
+
const mutObs = mutationObserverLookup.get(node);
|
|
438
|
+
if (mutObs !== undefined) {
|
|
439
|
+
mutObservers.push(mutObs);
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
const currentCount = refCount.get(node) || 0;
|
|
443
|
+
const newMutObs = new RootMutObs(node);
|
|
444
|
+
mutationObserverLookup.set(node, newMutObs);
|
|
445
|
+
refCount.set(node, currentCount + 1);
|
|
446
|
+
mutObservers.push(newMutObs);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (areAllIdle(mutObservers)) {
|
|
450
|
+
resolve();
|
|
451
|
+
}
|
|
452
|
+
for (const obs of mutObservers) {
|
|
453
|
+
obs.addEventListener('is-idle', () => {
|
|
454
|
+
if (areAllIdle(mutObservers)) {
|
|
455
|
+
resolve();
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
function areAllIdle(mutObs) {
|
|
462
|
+
for (const mo of mutObs) {
|
|
463
|
+
if (!mo.isIdle)
|
|
464
|
+
return false;
|
|
465
|
+
}
|
|
466
|
+
return true;
|
|
467
|
+
}
|
|
433
468
|
const refCountErr = 'mount-observer ref count mismatch';
|
|
434
469
|
export const inclTemplQry = 'template[src^="#"]:not([hidden])';
|
|
435
470
|
// https://github.com/webcomponents-cg/community-protocols/issues/12#issuecomment-872415080
|
package/MountObserver.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {bindish, bindishIt} from './bindish.js';
|
|
|
11
11
|
export {MOSE} from './ts-refs/mount-observer/types';
|
|
12
12
|
export const guid = '5Pv6bHOVH0ae07opRZ8N/g';
|
|
13
13
|
|
|
14
|
-
const mutationObserverLookup = new WeakMap<Node, RootMutObs>();
|
|
14
|
+
export const mutationObserverLookup = new WeakMap<Node, RootMutObs>();
|
|
15
15
|
const refCount = new WeakMap<Node, number>();
|
|
16
16
|
export class MountObserver extends EventTarget implements IMountObserver{
|
|
17
17
|
|
|
@@ -437,12 +437,12 @@ export class MountObserver extends EventTarget implements IMountObserver{
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
}
|
|
440
|
-
await bindishIt(els, assigner);
|
|
440
|
+
await bindishIt(els, {assigner});
|
|
441
441
|
this.#mount(elsToMount, initializing);
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
async #inspectWithin(within: Node, initializing: boolean){
|
|
445
|
-
await bindish(within as DocumentFragment, this.#mountInit.assigner);
|
|
445
|
+
await bindish(within as DocumentFragment, {assigner: this.#mountInit.assigner});
|
|
446
446
|
await this.composeFragment(within as DocumentFragment, 0);
|
|
447
447
|
const match = await this.#selector();
|
|
448
448
|
const els = Array.from((within as Element).querySelectorAll(match));
|
|
@@ -451,6 +451,40 @@ export class MountObserver extends EventTarget implements IMountObserver{
|
|
|
451
451
|
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
+
export function waitForIdleNodes(nodes: Array<Node>): Promise<void>{
|
|
455
|
+
return new Promise((resolve) => {
|
|
456
|
+
const mutObservers: Array<RootMutObs> = [];
|
|
457
|
+
for(const node of nodes){
|
|
458
|
+
const mutObs = mutationObserverLookup.get(node);
|
|
459
|
+
if(mutObs !== undefined){
|
|
460
|
+
mutObservers.push(mutObs);
|
|
461
|
+
}else{
|
|
462
|
+
const currentCount = refCount.get(node) || 0;
|
|
463
|
+
const newMutObs = new RootMutObs(node);
|
|
464
|
+
mutationObserverLookup.set(node, newMutObs);
|
|
465
|
+
refCount.set(node, currentCount + 1);
|
|
466
|
+
mutObservers.push(newMutObs);
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if(areAllIdle(mutObservers)){
|
|
470
|
+
resolve();
|
|
471
|
+
}
|
|
472
|
+
for(const obs of mutObservers){
|
|
473
|
+
obs.addEventListener('is-idle', () => {
|
|
474
|
+
if(areAllIdle(mutObservers)){
|
|
475
|
+
resolve();
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
function areAllIdle(mutObs: Array<RootMutObs>){
|
|
483
|
+
for(const mo of mutObs){
|
|
484
|
+
if(!mo.isIdle) return false;
|
|
485
|
+
}
|
|
486
|
+
return true;
|
|
487
|
+
}
|
|
454
488
|
|
|
455
489
|
|
|
456
490
|
const refCountErr = 'mount-observer ref count mismatch';
|
package/Newish.js
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
export { waitForEvent } from './waitForEvent.js';
|
|
2
|
+
export const attached = Symbol.for('xyyspnstnU+CDrNVa0VnxA');
|
|
2
3
|
export class Newish {
|
|
3
4
|
queue = [];
|
|
4
5
|
isResolved = false;
|
|
5
6
|
#ce;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
//#assigner: undefined | Assigner = undefined;
|
|
8
|
+
#options;
|
|
9
|
+
constructor(enhancedElement, itemscope, options) {
|
|
10
|
+
this.#options = options || { assigner: Object.assign };
|
|
9
11
|
this.#do(enhancedElement, itemscope);
|
|
10
12
|
}
|
|
11
13
|
async #do(enhancedElement, itemscope) {
|
|
12
|
-
|
|
14
|
+
if (enhancedElement[attached] === true)
|
|
15
|
+
return;
|
|
16
|
+
enhancedElement[attached] = true;
|
|
13
17
|
await customElements.whenDefined(itemscope);
|
|
14
18
|
const initPropVals = enhancedElement['ish'];
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const parsedHostProps = JSON.parse(enhancedElement.dataset.ish);
|
|
20
|
-
this.queue.push(parsedHostProps);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (initPropVals !== undefined)
|
|
24
|
-
this.queue.push(initPropVals);
|
|
25
|
-
const ce = document.createElement(itemscope);
|
|
26
|
-
if ('attachedCallback' in ce && typeof ce.attachedCallback === 'function') {
|
|
27
|
-
await ce.attachedCallback(enhancedElement);
|
|
19
|
+
if (enhancedElement instanceof HTMLElement) {
|
|
20
|
+
if (enhancedElement.dataset.ish) {
|
|
21
|
+
const parsedHostProps = JSON.parse(enhancedElement.dataset.ish);
|
|
22
|
+
this.queue.push(parsedHostProps);
|
|
28
23
|
}
|
|
29
|
-
this.#ce = ce;
|
|
30
|
-
const self = this;
|
|
31
|
-
Object.defineProperty(enhancedElement, 'ish', {
|
|
32
|
-
get() {
|
|
33
|
-
return self.#ce;
|
|
34
|
-
},
|
|
35
|
-
set(nv) {
|
|
36
|
-
self.queue.push(nv);
|
|
37
|
-
self.#assignGingerly();
|
|
38
|
-
},
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
});
|
|
42
|
-
this.#assignGingerly();
|
|
43
24
|
}
|
|
25
|
+
if (initPropVals !== undefined)
|
|
26
|
+
this.queue.push(initPropVals);
|
|
27
|
+
const ce = document.createElement(itemscope);
|
|
28
|
+
if ('attachedCallback' in ce && typeof ce.attachedCallback === 'function') {
|
|
29
|
+
await ce.attachedCallback(enhancedElement);
|
|
30
|
+
}
|
|
31
|
+
this.#ce = ce;
|
|
32
|
+
const self = this;
|
|
33
|
+
Object.defineProperty(enhancedElement, 'ish', {
|
|
34
|
+
get() {
|
|
35
|
+
return self.#ce;
|
|
36
|
+
},
|
|
37
|
+
set(nv) {
|
|
38
|
+
self.queue.push(nv);
|
|
39
|
+
self.#assignGingerly();
|
|
40
|
+
},
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
});
|
|
44
|
+
this.#assignGingerly();
|
|
44
45
|
//attach any itemref references
|
|
45
46
|
if (enhancedElement.hasAttribute('itemref')) {
|
|
46
47
|
const itemref = enhancedElement.getAttribute('itemref');
|
|
@@ -68,7 +69,6 @@ export class Newish {
|
|
|
68
69
|
if (ce === undefined) {
|
|
69
70
|
throw 500;
|
|
70
71
|
}
|
|
71
|
-
//const {assignGingerly} = await import('../lib/assignGingerly.js');
|
|
72
72
|
while (this.queue.length > 0) {
|
|
73
73
|
const fi = this.queue.shift();
|
|
74
74
|
//TODO: Provide support for a virtual slice of a very large list
|
|
@@ -76,12 +76,8 @@ export class Newish {
|
|
|
76
76
|
ce.$ = fi;
|
|
77
77
|
}
|
|
78
78
|
else {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
Object.assign(ce, fi);
|
|
84
|
-
}
|
|
79
|
+
const { assigner } = this.#options;
|
|
80
|
+
await assigner(ce, fi);
|
|
85
81
|
}
|
|
86
82
|
}
|
|
87
83
|
}
|
package/Newish.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { Assigner } from './ts-refs/mount-observer/types.js';
|
|
1
|
+
import { Assigner, BindishOptions } from './ts-refs/mount-observer/types.js';
|
|
2
2
|
|
|
3
3
|
export {waitForEvent} from './waitForEvent.js';
|
|
4
|
+
export const attached = Symbol.for('xyyspnstnU+CDrNVa0VnxA');
|
|
4
5
|
export class Newish{
|
|
5
6
|
queue: Array<any> = [];
|
|
6
7
|
isResolved = false;
|
|
7
8
|
#ce: HTMLElement | undefined;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
//#assigner: undefined | Assigner = undefined;
|
|
11
|
+
#options: BindishOptions;
|
|
10
12
|
|
|
11
|
-
constructor(enhancedElement: Element, itemscope: string,
|
|
12
|
-
this.#
|
|
13
|
+
constructor(enhancedElement: Element, itemscope: string, options?: BindishOptions){
|
|
14
|
+
this.#options = options || {assigner: Object.assign};
|
|
13
15
|
this.#do(enhancedElement, itemscope);
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
async #do(enhancedElement: Element, itemscope: string){
|
|
17
|
-
|
|
19
|
+
if((<any>enhancedElement)[attached] === true) return;
|
|
20
|
+
(<any>enhancedElement)[attached] = true;
|
|
18
21
|
await customElements.whenDefined(itemscope);
|
|
19
22
|
const initPropVals = (<any>enhancedElement)['ish'];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const parsedHostProps = JSON.parse(enhancedElement.dataset.ish);
|
|
25
|
-
this.queue.push(parsedHostProps);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
if(initPropVals !== undefined) this.queue.push(initPropVals);
|
|
29
|
-
const ce = document.createElement(itemscope);
|
|
30
|
-
if('attachedCallback' in ce && typeof ce.attachedCallback === 'function'){
|
|
31
|
-
await ce.attachedCallback(enhancedElement)
|
|
23
|
+
if(enhancedElement instanceof HTMLElement){
|
|
24
|
+
if(enhancedElement.dataset.ish){
|
|
25
|
+
const parsedHostProps = JSON.parse(enhancedElement.dataset.ish);
|
|
26
|
+
this.queue.push(parsedHostProps);
|
|
32
27
|
}
|
|
33
|
-
this.#ce = ce;
|
|
34
|
-
const self = this;
|
|
35
|
-
Object.defineProperty(enhancedElement, 'ish', {
|
|
36
|
-
get(){
|
|
37
|
-
return self.#ce;
|
|
38
|
-
},
|
|
39
|
-
set(nv: any){
|
|
40
|
-
self.queue.push(nv);
|
|
41
|
-
self.#assignGingerly();
|
|
42
|
-
},
|
|
43
|
-
enumerable: true,
|
|
44
|
-
configurable: true,
|
|
45
|
-
});
|
|
46
|
-
this.#assignGingerly();
|
|
47
28
|
}
|
|
29
|
+
if(initPropVals !== undefined) this.queue.push(initPropVals);
|
|
30
|
+
const ce = document.createElement(itemscope);
|
|
31
|
+
if('attachedCallback' in ce && typeof ce.attachedCallback === 'function'){
|
|
32
|
+
await ce.attachedCallback(enhancedElement)
|
|
33
|
+
}
|
|
34
|
+
this.#ce = ce;
|
|
35
|
+
const self = this;
|
|
36
|
+
Object.defineProperty(enhancedElement, 'ish', {
|
|
37
|
+
get(){
|
|
38
|
+
return self.#ce;
|
|
39
|
+
},
|
|
40
|
+
set(nv: any){
|
|
41
|
+
self.queue.push(nv);
|
|
42
|
+
self.#assignGingerly();
|
|
43
|
+
},
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
});
|
|
47
|
+
this.#assignGingerly();
|
|
48
48
|
//attach any itemref references
|
|
49
49
|
if(enhancedElement.hasAttribute('itemref')){
|
|
50
50
|
const itemref = enhancedElement.getAttribute('itemref')!;
|
|
@@ -72,18 +72,15 @@ export class Newish{
|
|
|
72
72
|
if(ce === undefined){
|
|
73
73
|
throw 500;
|
|
74
74
|
}
|
|
75
|
-
//const {assignGingerly} = await import('../lib/assignGingerly.js');
|
|
76
75
|
while(this.queue.length > 0 ){
|
|
77
76
|
const fi = this.queue.shift();
|
|
78
77
|
//TODO: Provide support for a virtual slice of a very large list
|
|
79
78
|
if(Array.isArray(fi)){
|
|
80
79
|
(<any>ce).$ = fi;
|
|
81
80
|
}else{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Object.assign(ce, fi);
|
|
86
|
-
}
|
|
81
|
+
const {assigner} = this.#options;
|
|
82
|
+
await assigner!(ce, fi);
|
|
83
|
+
|
|
87
84
|
}
|
|
88
85
|
|
|
89
86
|
}
|
package/RootMutObs.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
export class RootMutObs extends EventTarget {
|
|
2
|
+
#idleTimeout = 20; //TODO: make this configurable
|
|
3
|
+
#idlePointer = 0;
|
|
2
4
|
constructor(rootNode) {
|
|
3
5
|
super();
|
|
4
6
|
this.#mutationObserver = new MutationObserver(mutationRecords => {
|
|
5
7
|
this.dispatchEvent(new MutationEvent(mutationRecords));
|
|
8
|
+
this.#triggerIsIdle();
|
|
6
9
|
});
|
|
7
10
|
this.#mutationObserver.observe(rootNode, {
|
|
8
11
|
subtree: true,
|
|
@@ -10,6 +13,19 @@ export class RootMutObs extends EventTarget {
|
|
|
10
13
|
attributes: true,
|
|
11
14
|
attributeOldValue: true,
|
|
12
15
|
});
|
|
16
|
+
this.#triggerIsIdle();
|
|
17
|
+
}
|
|
18
|
+
#isIdle = false;
|
|
19
|
+
get isIdle() {
|
|
20
|
+
return this.#isIdle;
|
|
21
|
+
}
|
|
22
|
+
#triggerIsIdle() {
|
|
23
|
+
this.#isIdle = false;
|
|
24
|
+
clearTimeout(this.#idlePointer);
|
|
25
|
+
this.#idlePointer = setTimeout(() => {
|
|
26
|
+
this.#isIdle = true;
|
|
27
|
+
this.dispatchEvent(new Event('is-idle'));
|
|
28
|
+
}, this.#idleTimeout);
|
|
13
29
|
}
|
|
14
30
|
#mutationObserver;
|
|
15
31
|
disconnect() {
|
package/RootMutObs.ts
CHANGED
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
import {mutationEventName, AddMutationEventListener} from './ts-refs/mount-observer/types';
|
|
2
2
|
|
|
3
3
|
export class RootMutObs extends EventTarget{
|
|
4
|
+
#idleTimeout = 20; //TODO: make this configurable
|
|
5
|
+
#idlePointer = 0;
|
|
4
6
|
constructor(rootNode: Node ){
|
|
5
7
|
super();
|
|
8
|
+
|
|
6
9
|
this.#mutationObserver = new MutationObserver(mutationRecords => {
|
|
7
|
-
this.dispatchEvent(new MutationEvent(mutationRecords))
|
|
8
|
-
|
|
10
|
+
this.dispatchEvent(new MutationEvent(mutationRecords));
|
|
11
|
+
this.#triggerIsIdle();
|
|
12
|
+
});
|
|
9
13
|
this.#mutationObserver.observe(rootNode, {
|
|
10
14
|
subtree: true,
|
|
11
15
|
childList: true,
|
|
12
16
|
attributes: true,
|
|
13
17
|
attributeOldValue: true,
|
|
14
18
|
});
|
|
19
|
+
this.#triggerIsIdle();
|
|
20
|
+
}
|
|
21
|
+
#isIdle = false;
|
|
22
|
+
get isIdle(){
|
|
23
|
+
return this.#isIdle;
|
|
24
|
+
}
|
|
25
|
+
#triggerIsIdle(){
|
|
26
|
+
this.#isIdle = false;
|
|
27
|
+
clearTimeout(this.#idlePointer);
|
|
28
|
+
this.#idlePointer = setTimeout(()=>{
|
|
29
|
+
this.#isIdle = true;
|
|
30
|
+
this.dispatchEvent(new Event('is-idle'));
|
|
31
|
+
}, this.#idleTimeout)
|
|
15
32
|
}
|
|
16
33
|
#mutationObserver: MutationObserver;
|
|
17
34
|
disconnect(){
|
|
@@ -38,3 +55,4 @@ export class MutationEvent extends Event implements MutationEvent {
|
|
|
38
55
|
|
|
39
56
|
|
|
40
57
|
|
|
58
|
+
|
package/bindish.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export const itemscopeQry = '[itemscope*="-"]';
|
|
2
|
-
export async function bindish(fragment,
|
|
2
|
+
export async function bindish(fragment, options) {
|
|
3
3
|
const scopes = Array.from(fragment.querySelectorAll(`${itemscopeQry}`));
|
|
4
|
-
await bindishIt(scopes,
|
|
4
|
+
await bindishIt(scopes, options);
|
|
5
5
|
}
|
|
6
|
-
export async function bindishIt(scopes,
|
|
6
|
+
export async function bindishIt(scopes, options) {
|
|
7
7
|
for (const scope of scopes) {
|
|
8
8
|
const itemscope = scope.getAttribute('itemscope');
|
|
9
9
|
if (itemscope && itemscope.includes('-') && !(scope.ish instanceof HTMLElement)) {
|
|
10
10
|
const { Newish } = await import('./Newish.js');
|
|
11
|
-
new Newish(scope, itemscope,
|
|
11
|
+
new Newish(scope, itemscope, options);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
}
|
package/bindish.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Assigner } from './ts-refs/mount-observer/types.js';
|
|
1
|
+
import { Assigner, BindishOptions } from './ts-refs/mount-observer/types.js';
|
|
2
2
|
|
|
3
3
|
export const itemscopeQry = '[itemscope*="-"]';
|
|
4
|
-
export async function bindish(fragment: DocumentFragment,
|
|
4
|
+
export async function bindish(fragment: DocumentFragment, options?: BindishOptions){
|
|
5
5
|
const scopes = Array.from(fragment.querySelectorAll(`${itemscopeQry}`));
|
|
6
|
-
await bindishIt(scopes,
|
|
6
|
+
await bindishIt(scopes, options);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
export async function bindishIt(scopes: Array<Element>,
|
|
9
|
+
export async function bindishIt(scopes: Array<Element>, options?: BindishOptions){
|
|
10
10
|
for(const scope of scopes){
|
|
11
11
|
const itemscope = scope.getAttribute('itemscope');
|
|
12
12
|
if(itemscope && itemscope.includes('-') && !((<any>scope).ish instanceof HTMLElement)){
|
|
13
13
|
const {Newish} = await import('./Newish.js');
|
|
14
|
-
new Newish(scope, itemscope,
|
|
14
|
+
new Newish(scope, itemscope, options);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//import { MountObserver } from "./MountObserver";
|
|
2
1
|
|
|
3
2
|
export interface JSONSerializableMountInit{
|
|
4
3
|
readonly on?: CSSMatch,
|
|
@@ -208,6 +207,11 @@ export interface MOSE<TSynConfig=any>
|
|
|
208
207
|
|
|
209
208
|
}
|
|
210
209
|
|
|
210
|
+
export interface BindishOptions{
|
|
211
|
+
assigner?: Assigner,
|
|
212
|
+
waitFor?: string,
|
|
213
|
+
}
|
|
214
|
+
|
|
211
215
|
//#endregion
|
|
212
216
|
|
|
213
217
|
|