Changes for page Community App Developer Guide
Last modified by bougault on 2022/03/02 11:58
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. bougault1 +XWiki.mmorgan - Content
-
... ... @@ -81,13 +81,17 @@ 81 81 82 82 The Collaboratory will get the settings from its key/value store and pass them to your app through query parameters. 83 83 84 +== Your app with hash-based URL == 84 84 85 - ==Updating parentframe fragment(hash)==86 +The app you are developing might be a single page app that needs to handle some routing between views. This is typically done with a hash-based URL using the fragment at the end to track the view in the page. 86 86 87 -The app you are developing might be a single page app that need to handle some routing between views. The Community Apps environment gives you the ability to update the parent frame fragment. 88 +(% style="text-align: center;" %) 89 +{{{URI = scheme:[//authority]path[?query][#fragment]}}} 88 88 89 - It uses the[[postMessage javascript API>>https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage]]tocommunicatefromtheAPP iframeto thewiki (parent)frame.91 +The Community Apps environment gives you the ability to update the parent frame fragment. 90 90 93 +It uses the [[postMessage() javascript API>>https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage]] to communicate from your app's iframe to the wiki (parent) frame. 94 + 91 91 {{code language="javascript"}} 92 92 window.parent.postMessage({ 93 93 topic: '/clb/community-app/hashchange', ... ... @@ -95,7 +95,7 @@ 95 95 }, 'https://wiki.ebrains.eu'); 96 96 {{/code}} 97 97 98 -If a fragment is present in the parent frame URL ,at parent page load time, this fragment is transmitted totheApp's iframe.102 +If a fragment is present in the parent frame URL at parent page load time, this fragment is transmitted to your app's iframe. 99 99 100 100 == Creating your OpenID Connect client == 101 101