@onsvisual/svelte-components 0.1.12 → 0.1.13
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.
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
export default class Embed extends SvelteComponentTyped<{
|
|
5
5
|
pymChild?: any;
|
|
6
6
|
}, {
|
|
7
|
+
load: CustomEvent<any>;
|
|
8
|
+
} & {
|
|
7
9
|
[evt: string]: CustomEvent<any>;
|
|
8
10
|
}, {
|
|
9
11
|
default: {};
|
|
@@ -18,6 +20,8 @@ declare const __propDef: {
|
|
|
18
20
|
pymChild?: object;
|
|
19
21
|
};
|
|
20
22
|
events: {
|
|
23
|
+
load: CustomEvent<any>;
|
|
24
|
+
} & {
|
|
21
25
|
[evt: string]: CustomEvent<any>;
|
|
22
26
|
};
|
|
23
27
|
slots: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { onMount } from "svelte";
|
|
2
|
+
import { onMount, createEventDispatcher } from "svelte";
|
|
3
3
|
import pym from "pym.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export let pymChild = null;
|
|
10
10
|
|
|
11
|
+
const dispatch = createEventDispatcher();
|
|
12
|
+
|
|
11
13
|
onMount(() => {
|
|
12
14
|
pymChild = new pym.Child();
|
|
13
15
|
|
|
@@ -17,6 +19,10 @@
|
|
|
17
19
|
Math.max(document.body.scrollHeight, document.body.offsetHeight)
|
|
18
20
|
);
|
|
19
21
|
}, 1000);
|
|
22
|
+
|
|
23
|
+
const href = document.location.href;
|
|
24
|
+
const parentUrl = new URLSearchParams(document.location.search).get("parentUrl");
|
|
25
|
+
dispatch("load", { href, parentUrl });
|
|
20
26
|
});
|
|
21
27
|
</script>
|
|
22
28
|
|