Context.registerFunction

void registerFunction(T)(string name, T callback) nothrow

Register a D function/delegate as a JavaScript function.

void registerFunction(alias Func)() if (isFunction!Func) nothrow

Register with automatic name from the function symbol. Only works with function pointers/aliases, not runtime delegates.