new RMP_Scripter(conf)
This constructor allows you to create a JavaScript widget that can be inserted dynamically in your web interface.
Parameters:
Name | Type | Description |
---|---|---|
conf |
Object | JSON structure which contains the configuration of the JavaScript widget |
Example
var conf = {
"id":"id_scripter",
"label":"My scripter",
"variable":[{"name":"my_scripter"}],
"js-type":"RMP_Scripter"
};
var scripter = new RMP_Scripter(conf);
id_of_a_widget.insertAfter(scripter);
id_scripter.setJsWidgetScript(()=> {
// do whatever
return "scripter executed"
})