executeΒΆ

This function will execute a Java script command and return any result. It is used to allow the users to execute exposed Java script commands. See Script Commands.

execute(name, params)
Arguments:
  • name (string) – Name of command to execute.
  • object (params) – Parameters passed down to the execute method.
Returns:

The result of the execute method.

Examples:

// Execute command
var result = execute('thymeleaf.render', {
  view: resolve('myview.html'),
  model: {
    friut: 'apple',
    stock: 10
  }
});