Commit ·
1663a0e
1
Parent(s): 958af47
added hashchange listener for parent
Browse files- src/main.tsx +9 -0
src/main.tsx
CHANGED
|
@@ -8,3 +8,12 @@ createRoot(document.getElementById("root")!).render(
|
|
| 8 |
<App />
|
| 9 |
</StrictMode>
|
| 10 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
<App />
|
| 9 |
</StrictMode>
|
| 10 |
);
|
| 11 |
+
|
| 12 |
+
window.addEventListener("hashchange", () =>
|
| 13 |
+
window.parent.postMessage(
|
| 14 |
+
{
|
| 15 |
+
hash: window.location.hash,
|
| 16 |
+
},
|
| 17 |
+
"https://huggingface.co"
|
| 18 |
+
)
|
| 19 |
+
);
|