// call scripting function defined on global level // Example, script: // function foo() {...} // Native code: // dom::element root = ... get root element of main document or some frame inside it // root.call_function("foo"); // call the function public SciterValue CallFunction(string name, params SciterValue[] args) { Debug.Assert(name != null); SciterXValue.VALUE vret; _api.SciterCallScriptingFunction(_he, name, SciterValue.ToVALUEArray(args), (uint)args.Length, out vret); return(new SciterValue(vret)); }
public SciterValue CallFunction(string name, params SciterValue[] args) { Debug.Assert(_hwnd != IntPtr.Zero, "Create the window first"); Debug.Assert(name != null); SciterXValue.VALUE vret = new SciterXValue.VALUE(); _api.SciterCall(_hwnd, name, (uint)args.Length, SciterValue.ToVALUEArray(args), out vret); return(new SciterValue(vret)); }