Rhino.Context.DecompileFunction C# (CSharp) Method

DecompileFunction() public method

Decompile a JavaScript Function.
Decompile a JavaScript Function.

Decompiles a previously compiled JavaScript function object to canonical source.

Returns function body of '[native code]' if no decompilation information is available.

public DecompileFunction ( System.Function fun, int indent ) : string
fun System.Function the JavaScript function to decompile
indent int the number of spaces to indent the result
return string
		public string DecompileFunction(Function fun, int indent)
		{
			if (fun is BaseFunction)
			{
				return ((BaseFunction)fun).Decompile(indent, 0);
			}
			else
			{
				return "function " + fun.GetClassName() + "() {\n\t[native code]\n}\n";
			}
		}
Context