feat(verifier): bind doubleTap and decode DoubleTap actions

This commit is contained in:
pj committed 2026-05-30 11:05:50 +05:30
1 parent 237ead2d33
commit 6766f1ad58
3 files changed
+19

No files matched your search

+14
View File
@@ -100,6 +100,9 @@ func (v *Verifier) installRuntimeBindings() error {
if err := sanderling.Set("tap", v.bindTap); err != nil {
return err
}
if err := sanderling.Set("doubleTap", v.bindDoubleTap); err != nil {
return err
}
if err := sanderling.Set("inputText", v.bindInputText); err != nil {
return err
}
@@ -391,6 +394,17 @@ func (v *Verifier) bindTap(call goja.FunctionCall) goja.Value {
return handle
}
func (v *Verifier) bindDoubleTap(call goja.FunctionCall) goja.Value {
parameters := call.Argument(0).ToObject(v.runtime)
if parameters == nil {
panic(v.runtime.NewTypeError("DoubleTap requires {on}"))
}
handle := v.runtime.NewObject()
_ = handle.Set("kind", "DoubleTap")
_ = handle.Set("on", parameters.Get("on"))
return handle
}
func (v *Verifier) bindInputText(call goja.FunctionCall) goja.Value {
parameters := call.Argument(0).ToObject(v.runtime)
if parameters == nil {