new isfunction api:

This commit is contained in:
2026-01-26 11:48:15 -06:00
parent 6c07f11992
commit f310c18b84
2 changed files with 2 additions and 2 deletions

View File

@@ -239,7 +239,7 @@ JSC_SCALL(imgui_text, ImGui::Text("%s", str) )
JSC_SCALL(imgui_button,
bool gogo = ImGui::Button(str);
if (gogo && JS_IsFunction(js, argv[1]))
if (gogo && JS_IsFunction(argv[1]))
JS_Call(js, argv[1], JS_NULL, 0, NULL);
ret = JS_NewBool(js, gogo);
)

View File

@@ -204,7 +204,7 @@ static JSValue js_transform_get_change_hook(JSContext *js, JSValueConst self)
static JSValue js_transform_set_change_hook(JSContext *js, JSValueConst self, JSValue v)
{
transform *t = js2transform(js,self);
if (!JS_IsNull(v) && !JS_IsFunction(js,v)) return JS_ThrowReferenceError(js, "Hook must be a function.");
if (!JS_IsNull(v) && !JS_IsFunction(v)) return JS_ThrowReferenceError(js, "Hook must be a function.");
JS_FreeValue(js,t->change_hook);
t->change_hook = JS_DupValue(js,v);
return JS_NULL;