Changes for page Community App Developer Guide
Last modified by bougault on 2022/03/02 11:58
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -64,7 +64,7 @@ 64 64 65 65 The Collaboratory comes with a mechanism to let your app store its settings directly in the Collaboratory. 66 66 67 -In order to do that, your app needs to use the [[postMessage javascript API>>https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage]] to send the settings to be stored in the Collaboratory . The settings are key/value pairs as in the example below.67 +In order to do that, your app needs to use the [[postMessage javascript API>>https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage]] to send the settings to be stored in the Collaboratory: 68 68 69 69 {{code language="javascript"}} 70 70 window.parent.postMessage({ ... ... @@ -81,26 +81,6 @@ 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 == 85 - 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. 87 - 88 -(% style="text-align: center;" %) 89 -{{{URI = scheme:[//authority]path[?query][#fragment]}}} 90 - 91 -The Community Apps environment gives you the ability to update the parent frame fragment. 92 - 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 - 95 -{{code language="javascript"}} 96 -window.parent.postMessage({ 97 - topic: '/clb/community-app/hashchange', 98 - data: "the_fragment_value" 99 -}, 'https://wiki.ebrains.eu'); 100 -{{/code}} 101 - 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. 103 - 104 104 == Creating your OpenID Connect client == 105 105 106 -See the instructions [[here>>doc: Collabs.collaboratory-community-apps.Community App Developer Guide.1\.Registering an OIDC client.WebHome]].86 +See the instructions [[here>>doc:.Registering an OIDC client.WebHome]].