Methods
getWebdata(keyopt)
Used to get the state value of the webdata variable. User can access to the webdata list in the Function > Variable panel.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
key | string | <optional> | the variable name of the webdata |
Example
const webdataMode = API.WEBDATAMONITOR.getWebdata("App.Page_1.LayoutInfo_1.mode");
console.log(webdataMode)monitorWebdata(keyopt, callbackopt)
Used to subscribe a specific webdata. User can access to the webdata list in the Function > Variable panel.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
key | string | <optional> | the variable name to be subscribed |
callback | function | <optional> | callback function called when variable's value changes |
Example
API.WEBDATAMONITOR.monitorWebdata(
"App.Page_1.LayoutInfo_1.mode",
(v)=>{
console.log(v);
}
)setWebdata(keyopt, valueopt)
Used to update the state value of the webdata variable User can access to the webdata list in the Function > Variable panel.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
key | string | <optional> | the variable name of the webdata |
value | string | <optional> | the value to be updated |
Example
API.WEBDATAMONITOR.setWebdata(
"App.Page_1.LayoutInfo_1.mode",
"manual"
)