Rename cowebsite API functions
This commit is contained in:
parent
fbff7491df
commit
fb7fe0dc0a
2 changed files with 8 additions and 40 deletions
|
@ -52,9 +52,7 @@ WA.nav.goToRoom("/_/global/<path to global map>.json#start-layer-2")
|
|||
### Opening/closing web page in Co-Websites
|
||||
|
||||
```
|
||||
WA.nav.openCoWebsite(url: string, allowApi: boolean = false, allowPolicy: string = "", position: number = 0): Promise
|
||||
WA.nav.closeCoWebsite(coWebsiteId: string): Promise
|
||||
WA.nav.closeCoWebsites(): Promise
|
||||
WA.nav.openCoWebSite(url: string, allowApi: boolean = false, allowPolicy: string = "", position: number = 0): Promise<CoWebsite>
|
||||
```
|
||||
|
||||
Opens the webpage at "url" in an iFrame (on the right side of the screen) or close that iFrame. `allowApi` allows the webpage to use the "IFrame API" and execute script (it is equivalent to putting the `openWebsiteAllowApi` property in the map). `allowPolicy` grants additional access rights to the iFrame. The `allowPolicy` parameter is turned into an [`allow` feature policy in the iFrame](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-allow), position in whitch slot the web page will be open.
|
||||
|
@ -62,17 +60,16 @@ Opens the webpage at "url" in an iFrame (on the right side of the screen) or clo
|
|||
Example:
|
||||
|
||||
```javascript
|
||||
const coWebsite = await WA.nav.openCoWebsite('https://www.wikipedia.org/');
|
||||
const coWebsiteWorkAdventure = await WA.nav.openCoWebsite('https://workadventu.re/', true, "", 1);
|
||||
const coWebsite = await WA.nav.openCoWebSite('https://www.wikipedia.org/');
|
||||
const coWebsiteWorkAdventure = await WA.nav.openCoWebSite('https://workadventu.re/', true, "", 1);
|
||||
// ...
|
||||
WA.nav.closeCoWebsite(coWebsite.id);
|
||||
WA.nav.closeCoWebsites();
|
||||
coWebsite.close();
|
||||
```
|
||||
|
||||
### Opening/closing web page in Co-Websites
|
||||
|
||||
```
|
||||
WA.nav.getCoWebsites(): Promise
|
||||
WA.nav.getCoWebSites(): Promise<CoWebsite[]>
|
||||
```
|
||||
|
||||
Get all opened co-websites withe their ids and positions.
|
||||
|
@ -80,5 +77,5 @@ Get all opened co-websites withe their ids and positions.
|
|||
Example:
|
||||
|
||||
```javascript
|
||||
const coWebsites = await WA.nav.getCowebsites();
|
||||
const coWebsites = await WA.nav.getCowebSites();
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue