WebView.parseJsArgs

A helper function to parse args passed as JSONValue[]

struct WebView
static
parseJsArgs
(
T...
)
(
JSONValue[] v
)

See Also

bindJs

void myFunction(JSONValue[] arg)
{
   with(WebView.parseJsArgs!(int, "hello", string, "world")(args))
   {
      // Just like we have named args
      writeln(hello);
      writeln(world);
   }
}

Meta