Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit f45037f

Browse files
committed
fix href access denied on CORS
1 parent df3c064 commit f45037f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

widget/index.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,14 @@
104104

105105
var oldUrl = history.pop();
106106
var webviewIframe = document.getElementById("webviewIframe");
107-
if (webviewIframe && oldUrl == webviewIframe.contentWindow.location.href)
108-
oldUrl = history.pop();
109-
107+
try{
108+
if (webviewIframe && oldUrl == webviewIframe.contentWindow.location.href)
109+
oldUrl = history.pop();
110+
}
111+
catch(e){
112+
console.warn(e);
113+
// most likely cross domain access failure
114+
}
110115
if (webviewIframe && oldUrl) {
111116
isBackClicked = true;
112117
webviewIframe.src = oldUrl;

0 commit comments

Comments
 (0)