mount-observer 0.1.17 → 0.1.18
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.
|
@@ -23,16 +23,15 @@ export class EnhanceMountedElementHandler extends EvtRt {
|
|
|
23
23
|
if (typeof registryItem.spawn !== 'function') {
|
|
24
24
|
throw new Error('Registry item "spawn" property must be a constructor function');
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
if (
|
|
28
|
-
const se =
|
|
26
|
+
const mose = context?.observer?.options?.mose;
|
|
27
|
+
if (mose) {
|
|
28
|
+
const se = mose.deref();
|
|
29
29
|
const { parentElement } = se;
|
|
30
30
|
const { enhKey } = registryItem;
|
|
31
31
|
if (!se.id && enhKey) {
|
|
32
32
|
se.id = `${parentElement?.localName}.${enhKey}`;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
console.log({ tbd });
|
|
36
35
|
// Spawn the enhancement
|
|
37
36
|
this.#spawnEnhancement(mountedElement, registryItem, context);
|
|
38
37
|
}
|
|
@@ -30,16 +30,15 @@ export class EnhanceMountedElementHandler extends EvtRt {
|
|
|
30
30
|
if (typeof registryItem.spawn !== 'function') {
|
|
31
31
|
throw new Error('Registry item "spawn" property must be a constructor function');
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
if(
|
|
35
|
-
const se =
|
|
33
|
+
const mose = context?.observer?.options?.mose;
|
|
34
|
+
if(mose){
|
|
35
|
+
const se = mose.deref() as HTMLScriptElement;
|
|
36
36
|
const {parentElement} = se;
|
|
37
37
|
const {enhKey} = registryItem;
|
|
38
38
|
if(!se.id && enhKey){
|
|
39
39
|
se.id = `${parentElement?.localName}.${ enhKey}`;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
console.log({ tbd });
|
|
43
42
|
|
|
44
43
|
// Spawn the enhancement
|
|
45
44
|
this.#spawnEnhancement(mountedElement, registryItem, context);
|