X-Git-Url: https://git.sesse.net/?p=nageru;a=blobdiff_plain;f=theme.cpp;fp=theme.cpp;h=091495f9cae0e78836a7b6c7f3f42480ffbadb0d;hp=71970c90f3ac4e849f3c0252172cb558f65544bc;hb=f7fba578a1f5e2ef2b0ede1ac058b3fdb95ab4b1;hpb=f1ce3c5618f769b1388b39c637877d242c8ddeed diff --git a/theme.cpp b/theme.cpp index 71970c9..091495f 100644 --- a/theme.cpp +++ b/theme.cpp @@ -448,6 +448,15 @@ int HTMLInput_set_max_fps(lua_State* L) return 0; } +int HTMLInput_execute_javascript_async(lua_State* L) +{ + assert(lua_gettop(L) == 2); + CEFCapture **video_input = (CEFCapture **)luaL_checkudata(L, 1, "HTMLInput"); + string js = checkstdstring(L, 2); + (*video_input)->execute_javascript_async(js); + return 0; +} + int HTMLInput_get_signal_num(lua_State* L) { assert(lua_gettop(L) == 1); @@ -665,11 +674,11 @@ const luaL_Reg VideoInput_funcs[] = { }; const luaL_Reg HTMLInput_funcs[] = { - // TODO: execute_javascript { "new", HTMLInput_new }, { "set_url", HTMLInput_set_url }, { "reload", HTMLInput_reload }, { "set_max_fps", HTMLInput_set_max_fps }, + { "execute_javascript_async", HTMLInput_execute_javascript_async }, { "get_signal_num", HTMLInput_get_signal_num }, { NULL, NULL } };