Request
<button mix-post="items">
Do something
</button>
Response
<browser
mix-script="
function test(name)
{alert(name)}
test('Hi')"
>
</browser>
If the browser needs to run a script, after the response, then mix-script can be used.
In this example, the request is sent and the response will instruct the browser to run a function called "test" passing two arguments to the function. An alert will popup with the arguments.
Note: Anything that is passed in the script attribute in the response will be run as plain JavaScript.
<button mix-post="items">
Do something
</button>
<browser
mix-script="
function test(name)
{alert(name)}
test('Hi')"
>
</browser>