Difference between revisions of "Start Action"
Jump to navigation
Jump to search
(Created page with "It is possible to execute a start action by setting an <code>action</code> property (of type <code>string</code>) to the menu or content data that is loaded at startup. An act...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | It is possible to execute a start action by setting an <code>action</code> property (of type <code>string</code>) to the menu or content data that is loaded at startup. An action-related <code>data</code> property (of type <code>object</code>) can also be set. By default, the action <code>home</code> is executed. This feature is available since version '''0.1.0'''. | + | It is possible to execute a start action by setting an <code>action</code> property (of type <code>string</code>) to the menu or content data that is loaded at startup. An action-related <code>data</code> property (of type <code>object</code>) can also be set. By default, the action <code>home</code> is executed. Please see [[Internal Actions]] for possible values. This feature is available since version '''0.1.0'''. |
'''Note: The default action is not executed if a start action is set. For example, if you set an empty action, a blank screen is displayed during startup until the user makes an interaction. Please also note that the start action is skipped if the context menu is opened during startup or the start data is restored (when the application returns from a link action).''' | '''Note: The default action is not executed if a start action is set. For example, if you set an empty action, a blank screen is displayed during startup until the user makes an interaction. Please also note that the start action is skipped if the context menu is opened during startup or the start data is restored (when the application returns from a link action).''' | ||
− | Please see following | + | Please see following example. |
+ | |||
+ | == Example == | ||
+ | === Screenshot === | ||
+ | [[File:start_action.png|thumb|640px|none|Example Screenshot (Start Action)]] | ||
+ | |||
+ | === Code === | ||
+ | <syntaxhighlight lang="json"> | ||
+ | { | ||
+ | "action": "info:Start action executed.", | ||
+ | "headline": "My Menu", | ||
+ | "menu": [{ | ||
+ | "label": "My Menu Item" | ||
+ | }] | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | === Demo === | ||
+ | * Launch via App: https://msx.benzac.de/?start=menu:https://msx.benzac.de/info/xp/data/hidden_feature_1.json | ||
+ | * Launch via Demo Page: https://msx.benzac.de/info/?start=menu:https://msx.benzac.de/info/xp/data/hidden_feature_1.json |
Latest revision as of 10:13, 15 January 2021
It is possible to execute a start action by setting an action
property (of type string
) to the menu or content data that is loaded at startup. An action-related data
property (of type object
) can also be set. By default, the action home
is executed. Please see Internal Actions for possible values. This feature is available since version 0.1.0.
Note: The default action is not executed if a start action is set. For example, if you set an empty action, a blank screen is displayed during startup until the user makes an interaction. Please also note that the start action is skipped if the context menu is opened during startup or the start data is restored (when the application returns from a link action).
Please see following example.
Example[edit]
Screenshot[edit]
Code[edit]
{
"action": "info:Start action executed.",
"headline": "My Menu",
"menu": [{
"label": "My Menu Item"
}]
}