method click ?xy button =
    let args = match xy with
        None -> [ sv_of_string button ]
      | Some (x, y) -> [ sv_of_string button; sv_of_int x; sv_of_int y ] in
    call_method_void sv "click" args