The web browser can also run Minicript code for web pages. Each web page created in the Web Page Editor in the Forge can have its own script. The main purpose of the script is to manipulate the absoluteDiv
elements.
You can manually add the <script>
tag to the metadata
section in the Forge:
<script rel="/scripts/script1" />
However, the recommended way to set the script path is by using the Web Page Editor:
If the script is set, it will be launched when a page is opened. If the script is already running and another page is opened, the script will be automatically stopped. However, if the browser window is closed, the script will not be stopped in order to preserve the current page state in case the user opens the browser again.
There are a bunch of miniscript functions to change the content page and interact with user. These functions are for invocation only in the scripts for the web browser.
The function displays text to the user. It has only one button (close the popup) and this button cannot be hidden. This function is not awaitable, so the next action will be performed immediately after the function is invoked, without waiting for the user to close the popup.
When the message is displayed, the user cannot navigate to another page or use the browser's navigation bar.
Parameters
content | text or localization key for message body |
---|---|
title | optional, text or localization key for window title |
ok | optional, text or localization key for close button |