marta

Function action()

fun marta.action(block: ActionDeclaration)

Defines an action.

A plugin can contain multiple actions, but each of them must have a unique identifier.

Example:

action {
    id = "hello.world",
    name = "Hello World",
    apply = function(context)
        martax.alert("Hello, world!")
    end
}