public FREObject EvaluateJavaScript(FREContext ctx, uint argc, FREObject[] argv) { var js = new FreObjectSharp(argv[0]).GetAsString(); var callbackFre = new FreObjectSharp(argv[1]); if (FreObjectTypeSharp.Null == callbackFre.GetType()) { EvaluateJavaScript(js); } else { var callback = callbackFre.GetAsString(); EvaluateJavaScript(js, callback); } return(FREObject.Zero); }
public FREObject CallJavascriptFunction(FREContext ctx, uint argc, FREObject[] argv) { var js = new FreObjectSharp(argv[0]).GetAsString(); var callbackFre = new FreObjectSharp(argv[1]); if (FreObjectTypeSharp.Null == callbackFre.GetType()) { CallJavascriptFunction(js); } else { var callback = callbackFre.GetAsString(); CallJavascriptFunction(js, callback); } return(FREObject.Zero); }
public FREObject InjectScript(FREContext ctx, uint argc, FREObject[] argv) { var injectCodeFre = new FreObjectSharp(argv[0]); var injectScriptUrlFre = new FreObjectSharp(argv[1]); var injectStartLineFre = new FreObjectSharp(argv[2]); if (FreObjectTypeSharp.String == injectCodeFre.GetType()) { _view.InjectCode = injectCodeFre.GetAsString(); } if (FreObjectTypeSharp.String == injectScriptUrlFre.GetType()) { _view.InjectScriptUrl = injectScriptUrlFre.GetAsString(); } _view.InjectStartLine = injectStartLineFre.GetAsInt(); return(FREObject.Zero); }