2014-04-14 13:44:38 -06:00

27 lines
557 B
Plaintext

{%
function test(name) {
context.write("Hello " + name + "!");
}
%}
{%
function test2(name) {
return "Hello " + name + "!";
}
%}
A
<p>
<c-invoke function="test('World')"/>
<c-write value="test2('World')"/>
</p>
B
<p>
<c-def function="greeting(name, count)">
Hello ${name}! You have ${count} new messages.
</c-def>
<c-invoke function="greeting" name="Frank" count="${10}"/>
<c-invoke function="greeting('John', 20)"/>
</p>