I am trying to reload the page by hitting the same URL of the app but getting this error in googleappscript, previously it was working fine but not it has stopped working
function reLoad() {
google.script.run
.withSuccessHandler(function(){
window.open("https://script.google.com/a/google.com/macros/s/AKfycbxqBb8dv488gLQjYCmJDGJ98EiX3Ipo5pUHmAHoRmY/dev","_top");
})
}
Google recently updated their iframe restrictions:
In the HTML Service iframe sandbox, allow-top-navigation, which allows the content to navigate its top-level browsing context, is restricted and not set as an attribute in the sandbox. Instead, the allow-top-navigation-by-user-activation attribute has been added to the sandbox.
If you need to redirect your script, add a link or a button for the user to take action on.
The function should work, if the function is called from the onclick handler of a button. The function should be directly associated with a click by the end user.