@rxdrag/website-lib-core 0.0.14 → 0.0.16
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/package.json
CHANGED
|
@@ -30,10 +30,12 @@ export class PageLoader implements IPageLoader {
|
|
|
30
30
|
doc?: Document
|
|
31
31
|
): PageLoader {
|
|
32
32
|
if (!PageLoader.instances[key]) {
|
|
33
|
+
console.log("===>创建 PageLoader 实例", key);
|
|
33
34
|
PageLoader.instances[key] = new PageLoader(key, doc);
|
|
34
35
|
} else if (doc) {
|
|
35
36
|
PageLoader.instances[key].setDoc(doc);
|
|
36
37
|
}
|
|
38
|
+
console.log("===>获取 PageLoader 实例", key);
|
|
37
39
|
return PageLoader.instances[key];
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -92,6 +94,7 @@ export class PageLoader implements IPageLoader {
|
|
|
92
94
|
|
|
93
95
|
// 只监听一个事件,优先使用 astro:page-load
|
|
94
96
|
if (typeof window !== "undefined") {
|
|
97
|
+
console.log("===>注册事件监听器 page load");
|
|
95
98
|
// 在客户端环境中
|
|
96
99
|
this.doc.addEventListener("astro:page-load", handleEvent, {
|
|
97
100
|
//once: true,
|