1.LTEncodedJSValue Int2JsValue(int n);

将C++的int类型转换JS类型

2.LTEncodedJSValue Float2JsValue(float f);

将C++的float类型转换JS类型

3.LTEncodedJSValue Double2JsValue(double d);

将C++的double类型转换JS类型

4.LTEncodedJSValue Boolean2JsValue(bool b);

将C++的bool类型转换JS类型

5.LTEncodedJSValue JsUndefined();

返回JS的Undefined

6.LTEncodedJSValue JsNull();

返回JS的NULL

7.LTEncodedJSValue JsTrue();

返回JS的true

8.LTEncodedJSValue JsFalse();

返回JS的Unfalse

9.LTEncodedJSValue String2JsValue(LTExecState es, const wchar_t* str);

将C++的wchar_t类型转换JS类型.eg:
wchar_t* str = L"LTFRAME";
LTEncodedJSValue arg =String2JsValue(es,str);

10.int JsValue2Int(LTExecState es, LTEncodedJSValue v);

将JS类型转换为C++的int类型

11.float JsValue2Float(LTExecState es, LTEncodedJSValue v);

将JS类型转换为C++的Float类型

12.double JsValue2Double(LTExecState es, LTEncodedJSValue v);

将JS类型转换为C++的Double类型

13.bool JsValue2Boolean(LTExecState es, LTEncodedJSValue v);

将JS类型转换为C++的Boolean类型

14.int JsValue2StringW(LTExecState es, LTEncodedJSValue v,wchar_t* result);

将JS类型转换为C++的wchar_t*类型.eg:
wchar_t * f=(wchar_t*)malloc(100);
ZeroMemory(f,100);
JsValue2String(es,GetJsParameter(es,0),f);

15.int JsValue2String(LTExecState es, LTEncodedJSValue v,char* result);

将JS类型转换为C++的wchar_t*类型.eg:
char * f=(char*)malloc(100);
ZeroMemory(f,100);
JsValue2String(es,GetJsParameter(es,0),f);

16.LTEncodedJSValue GetJsParameter(LTExecState es, int argIdx);

获取js参数

17.LTEncodedJSValue GetJsObjectParameter(LTExecState es,int argIdx,char* key);

argIdx:参数索引,key:参数名.eg:
int f= JsValue2String(es,GetJsObjectParameter(es,0,"f"),0);

18.LTEncodedJSValue JsCall(LTExecState es,LTEncodedJSValue func,LTEncodedJSValue* args, int argCount);

执行回掉函数eg:
LTEncodedJSValue fun = GetJsParameter(es,0);
LTEncodedJSValue arg1 =String2JsValue(L"A");
LTEncodedJSValue ptarg[1] = {arg1};
JsCall(es,fun,ptarg,1);

19.LTEncodedJSValue CreateJsObject(LTExecState es,LTEncodedJSValue o,char* key,LTEncodedJSValue value);

创建一个JS的OBJECT类型.eg:
int width=1;
int height=2;
LTEncodedJSValue value = CreateObject(es);
CreateJsObject(es,value,"width",Int2JsValue(width));
CreateJsObject(es,value,"height",Int2JsValue(height));

20.LTEncodedJSValue CreateObject(LTExecState es);

配合CreateJsObject使用

21.LTEncodedJSValue GetJsObjectAttribute(LTExecState es,LTEncodedJSValue v,char* key);

获取js Object中的属性.eg
LTEncodedJSValue jsv = webview->RunJavaScript("getobject()");
LTExecState exec = webview->GetGlobalExecState();
LTEncodedJSValue v = GetJsObjectAttribute(exec,jsv,"a");
LTEncodedJSValue xc = GetJsObjectAttribute(exec,v,"b");

22.bool IsJsNumber(LTEncodedJSValue v);

判断JS类型是否为数字类型

23.bool IsJsString(LTEncodedJSValue v);

判断JS类型是否为字符串类型

24.bool IsJsBoolean(LTEncodedJSValue v);

判断JS类型是否为Boolean类型

25.bool IsJsObject(LTEncodedJSValue v);

判断JS类型是否为Object

26.bool IsJsFunction(LTEncodedJSValue v);

判断JS类型是否为Function

27.bool IsJsUndefined(LTEncodedJSValue v);

判断JS类型是否为Undefined

28.bool IsJsNull(LTEncodedJSValue v);

判断JS类型是否为Null

29.bool IsJsArray(LTEncodedJSValue v);

判断JS类型是否为array

30.bool IsJsTrue(LTEncodedJSValue v);

判断JS类型是否为true

31.bool IsJsFalse(LTEncodedJSValue v);

判断JS类型是否为false