Forum Discussion
Taco888
May 13, 2020Copper Contributor
Call reload button programatically
I'm creating a tab app on Teams. I need to refresh contents but calling location.reload() does not work. Is there any way to call reload tab button on right upper side programatically?
Taco888
May 15, 2020Copper Contributor
Thanks. I tried as you recommended but it did not work.
The same error was shown.
And when I tried to call parent window method like:
window.parent.window.location.reload()
it gave me
Uncaught (in promise) DOMException: Blocked a frame with origin "https://xxx.com" from accessing a cross-origin frame.
Nikitha-MSFT
May 18, 2020Former Employee
Taco888 - Are you able to reload the page locally?
- Taco888May 18, 2020Copper Contributor
When I open Dev tool and enter "location.reload()" on the console pane, it works.
And if the page is loaded on browser other than Teams, it works programatically.
But the same thing does not work on Teams programatically.
- Nikitha-MSFTMay 20, 2020Former Employee
Taco888 - Which package are you using for teams?
- Taco888May 21, 2020Copper Contributor