Navigating views from Top Bar app
답변함Hi!
I'm building a simple app to navigate views via an app that drops down from the Top Bar. Similar to Quickie Plus (or the old free version, Quickie) and I'm unable to get the browser to go to a new page. All the methods that StackOverflow suggests are blocked.
eg.
<ahref="#"onclick="top.window.location.href='{{this.link}}';">
Gives an error of
Unsafe attempt to initiate navigation for frame with origin 'https://<subdomain>.zendesk.com' from frame with URL 'http://localhost:4567/iframe.html?origin=https%3A%2F%.zendesk.com&app_guid=d81a3df6-a20c-4ace-a6ac-5a6b8deb7d62'. The frame attempting navigation of the top-level window is sandboxed, but the flag of 'allow-top-navigation' or 'allow-top-navigation-by-user-activation' is not set.
Can I have some guidance as to how to implement this?
Thanks!
-
Hey Matthew,
We do not allow targeting the DOM in the Apps Framework for security and stability reasons. I'd suggest using our routeTo method instead to open up the view when called.
Hope this helps,
-
🤦🏻♂️
I knew there had to be a method and I’d looked right past it! Thanks!
-
No worries Matthew!
댓글을 남기려면 로그인하세요.
3 댓글