diff --git a/lib/Commands.ml b/lib/Commands.ml index a88468c..71e5020 100644 --- a/lib/Commands.ml +++ b/lib/Commands.ml @@ -1036,13 +1036,24 @@ module Animation = struct type t = { animations : string list; [@key "animations"] [@ocaml.doc "List of animation ids to seek."] - currentTime : Types.number; + currentTime : Types.number option; [@key "currentTime"] - [@ocaml.doc "Set the current time of each animation."] + [@yojson.option] + [@ocaml.doc "Set each animation to the same time."] + currentTimes : Types.number list option; + [@key "currentTimes"] + [@yojson.option] + [@ocaml.doc + "Set each animation to a different time. If set, should have the \ + same\n\ + length as animations. Exactly one of currentTime or \ + currentTimes should\n\ + be set."] } [@@deriving yojson] - let make ~animations ~currentTime () = { animations; currentTime } + let make ~animations ?currentTime ?currentTimes () = + { animations; currentTime; currentTimes } end module Request = struct diff --git a/package.json b/package.json index e9ac398..308c8ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cdp", - "version": "0.0.1697629", + "version": "0.0.1698617", "description": "Chrome Devtools Protocol Types for OCaml", "license": "MIT", "repository": {