Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
Created March 12, 2021 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WakkyFree/99003a8f46da306835e65d64ed76d415 to your computer and use it in GitHub Desktop.
Save WakkyFree/99003a8f46da306835e65d64ed76d415 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script type="text/javascript">
function update() {
google.script.run
.withSuccessHandler(result).getScriptUrl();
function result(url){
window.open(url, '_top')
}
}
</script>
</head>
<body>
<input type="button" value="ブラウザ更新" onclick="update()">
</body>
</html>
@excelboy83
Copy link

It seems this method doesn't work. I did use of it and now appers this message on console:
Unsafe attempt to initiate navigation for frame with origin

Do you know another alternative?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment