devtools-protocol 0.0.1696802 → 0.0.1698617

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1030,8 +1030,18 @@
1030
1030
  },
1031
1031
  {
1032
1032
  "name": "currentTime",
1033
- "description": "Set the current time of each animation.",
1033
+ "description": "Set each animation to the same time.",
1034
+ "optional": true,
1034
1035
  "type": "number"
1036
+ },
1037
+ {
1038
+ "name": "currentTimes",
1039
+ "description": "Set each animation to a different time. If set, should have the same\nlength as animations. Exactly one of currentTime or currentTimes should\nbe set.",
1040
+ "optional": true,
1041
+ "type": "array",
1042
+ "items": {
1043
+ "type": "number"
1044
+ }
1035
1045
  }
1036
1046
  ]
1037
1047
  },
@@ -9044,6 +9054,55 @@
9044
9054
  "type": "boolean"
9045
9055
  }
9046
9056
  ]
9057
+ },
9058
+ {
9059
+ "name": "setTextMarker",
9060
+ "description": "Sets a spelling or grammar error marker on the given range of text.\nSee https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md\nNote: exactly one between nodeId, backendNodeId and objectId should be passed\nto identify the node.",
9061
+ "experimental": true,
9062
+ "parameters": [
9063
+ {
9064
+ "name": "nodeId",
9065
+ "description": "Identifier of the node.",
9066
+ "optional": true,
9067
+ "$ref": "NodeId"
9068
+ },
9069
+ {
9070
+ "name": "backendNodeId",
9071
+ "description": "Identifier of the backend node.",
9072
+ "optional": true,
9073
+ "$ref": "BackendNodeId"
9074
+ },
9075
+ {
9076
+ "name": "objectId",
9077
+ "description": "JavaScript object id of the node wrapper.",
9078
+ "optional": true,
9079
+ "$ref": "Runtime.RemoteObjectId"
9080
+ },
9081
+ {
9082
+ "name": "type",
9083
+ "description": "The type of marker to set on the given range of text.",
9084
+ "type": "string",
9085
+ "enum": [
9086
+ "spelling",
9087
+ "grammar"
9088
+ ]
9089
+ },
9090
+ {
9091
+ "name": "start",
9092
+ "description": "Start offset into the element's rendered text in UTF-16 code units.\nFor a text control, an offset into the control's value.\nOffsets count text in DOM order and do not enter shadow trees.\nTo mark text inside a shadow tree, pass the element inside the shadow tree.",
9093
+ "type": "integer"
9094
+ },
9095
+ {
9096
+ "name": "end",
9097
+ "description": "End offset (exclusive) in the same units and space as start.",
9098
+ "type": "integer"
9099
+ }
9100
+ ]
9101
+ },
9102
+ {
9103
+ "name": "clearTextMarkers",
9104
+ "description": "Clears the spelling and grammar error text markers overlapping the ranges\nset by setTextMarker in this session. These markers are also removed when\nthe DOM domain is disabled or the session ends.",
9105
+ "experimental": true
9047
9106
  }
9048
9107
  ],
9049
9108
  "events": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtools-protocol",
3
- "version": "0.0.1696802",
3
+ "version": "0.0.1698617",
4
4
  "description": "The Chrome DevTools Protocol JSON",
5
5
  "repository": "https://github.com/ChromeDevTools/devtools-protocol",
6
6
  "author": "The Chromium Authors",
@@ -143,8 +143,12 @@ experimental domain Animation
143
143
  parameters
144
144
  # List of animation ids to seek.
145
145
  array of string animations
146
- # Set the current time of each animation.
147
- number currentTime
146
+ # Set each animation to the same time.
147
+ optional number currentTime
148
+ # Set each animation to a different time. If set, should have the same
149
+ # length as animations. Exactly one of currentTime or currentTimes should
150
+ # be set.
151
+ optional array of number currentTimes
148
152
 
149
153
  # Sets the paused state of a set of animations.
150
154
  command setPaused
@@ -845,6 +845,37 @@ domain DOM
845
845
  # If true, opens and holds interest. If false, releases forced interest.
846
846
  boolean enable
847
847
 
848
+ # Sets a spelling or grammar error marker on the given range of text.
849
+ # See https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md
850
+ # Note: exactly one between nodeId, backendNodeId and objectId should be passed
851
+ # to identify the node.
852
+ experimental command setTextMarker
853
+ parameters
854
+ # Identifier of the node.
855
+ optional NodeId nodeId
856
+ # Identifier of the backend node.
857
+ optional BackendNodeId backendNodeId
858
+ # JavaScript object id of the node wrapper.
859
+ optional Runtime.RemoteObjectId objectId
860
+ # The type of marker to set on the given range of text.
861
+ enum type
862
+ # A spelling error marker, rendered as ::spelling-error
863
+ spelling
864
+ # A grammar error marker, rendered as ::grammar-error
865
+ grammar
866
+ # Start offset into the element's rendered text in UTF-16 code units.
867
+ # For a text control, an offset into the control's value.
868
+ # Offsets count text in DOM order and do not enter shadow trees.
869
+ # To mark text inside a shadow tree, pass the element inside the shadow tree.
870
+ integer start
871
+ # End offset (exclusive) in the same units and space as start.
872
+ integer end
873
+
874
+ # Clears the spelling and grammar error text markers overlapping the ranges
875
+ # set by setTextMarker in this session. These markers are also removed when
876
+ # the DOM domain is disabled or the session ends.
877
+ experimental command clearTextMarkers
878
+
848
879
  # Fired when `Element`'s attribute is modified.
849
880
  event attributeModified
850
881
  parameters
@@ -3062,6 +3062,27 @@ export namespace ProtocolMapping {
3062
3062
  paramsType: [Protocol.DOM.ForceShowInterestRequest];
3063
3063
  returnType: void;
3064
3064
  };
3065
+ /**
3066
+ * Sets a spelling or grammar error marker on the given range of text.
3067
+ * See https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md
3068
+ * Note: exactly one between nodeId, backendNodeId and objectId should be passed
3069
+ * to identify the node.
3070
+ * @experimental
3071
+ */
3072
+ 'DOM.setTextMarker': {
3073
+ paramsType: [Protocol.DOM.SetTextMarkerRequest];
3074
+ returnType: void;
3075
+ };
3076
+ /**
3077
+ * Clears the spelling and grammar error text markers overlapping the ranges
3078
+ * set by setTextMarker in this session. These markers are also removed when
3079
+ * the DOM domain is disabled or the session ends.
3080
+ * @experimental
3081
+ */
3082
+ 'DOM.clearTextMarkers': {
3083
+ paramsType: [];
3084
+ returnType: void;
3085
+ };
3065
3086
  /**
3066
3087
  * Returns event listeners of the given object.
3067
3088
  */
@@ -1892,6 +1892,23 @@ export namespace ProtocolProxyApi {
1892
1892
  */
1893
1893
  forceShowInterest(params: Protocol.DOM.ForceShowInterestRequest): Promise<void>;
1894
1894
 
1895
+ /**
1896
+ * Sets a spelling or grammar error marker on the given range of text.
1897
+ * See https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md
1898
+ * Note: exactly one between nodeId, backendNodeId and objectId should be passed
1899
+ * to identify the node.
1900
+ * @experimental
1901
+ */
1902
+ setTextMarker(params: Protocol.DOM.SetTextMarkerRequest): Promise<void>;
1903
+
1904
+ /**
1905
+ * Clears the spelling and grammar error text markers overlapping the ranges
1906
+ * set by setTextMarker in this session. These markers are also removed when
1907
+ * the DOM domain is disabled or the session ends.
1908
+ * @experimental
1909
+ */
1910
+ clearTextMarkers(): Promise<void>;
1911
+
1895
1912
  /**
1896
1913
  * Fired when `Element`'s attribute is modified.
1897
1914
  */
@@ -1982,6 +1982,23 @@ export namespace ProtocolTestsProxyApi {
1982
1982
  */
1983
1983
  forceShowInterest(params: Protocol.DOM.ForceShowInterestRequest): Promise<{id: number, result: void, sessionId: string}>;
1984
1984
 
1985
+ /**
1986
+ * Sets a spelling or grammar error marker on the given range of text.
1987
+ * See https://github.com/Igalia/explainers/blob/main/force-spelling-grammar-markers/README.md
1988
+ * Note: exactly one between nodeId, backendNodeId and objectId should be passed
1989
+ * to identify the node.
1990
+ * @experimental
1991
+ */
1992
+ setTextMarker(params: Protocol.DOM.SetTextMarkerRequest): Promise<{id: number, result: void, sessionId: string}>;
1993
+
1994
+ /**
1995
+ * Clears the spelling and grammar error text markers overlapping the ranges
1996
+ * set by setTextMarker in this session. These markers are also removed when
1997
+ * the DOM domain is disabled or the session ends.
1998
+ * @experimental
1999
+ */
2000
+ clearTextMarkers(): Promise<{id: number, result: void, sessionId: string}>;
2001
+
1985
2002
  /**
1986
2003
  * Fired when `Element`'s attribute is modified.
1987
2004
  */
@@ -3453,9 +3453,15 @@ export namespace Protocol {
3453
3453
  */
3454
3454
  animations: string[];
3455
3455
  /**
3456
- * Set the current time of each animation.
3456
+ * Set each animation to the same time.
3457
3457
  */
3458
- currentTime: number;
3458
+ currentTime?: number;
3459
+ /**
3460
+ * Set each animation to a different time. If set, should have the same
3461
+ * length as animations. Exactly one of currentTime or currentTimes should
3462
+ * be set.
3463
+ */
3464
+ currentTimes?: number[];
3459
3465
  }
3460
3466
 
3461
3467
  export interface SetPausedRequest {
@@ -8218,6 +8224,41 @@ export namespace Protocol {
8218
8224
  enable: boolean;
8219
8225
  }
8220
8226
 
8227
+ export const enum SetTextMarkerRequestType {
8228
+ Spelling = 'spelling',
8229
+ Grammar = 'grammar',
8230
+ }
8231
+
8232
+ export interface SetTextMarkerRequest {
8233
+ /**
8234
+ * Identifier of the node.
8235
+ */
8236
+ nodeId?: NodeId;
8237
+ /**
8238
+ * Identifier of the backend node.
8239
+ */
8240
+ backendNodeId?: BackendNodeId;
8241
+ /**
8242
+ * JavaScript object id of the node wrapper.
8243
+ */
8244
+ objectId?: Runtime.RemoteObjectId;
8245
+ /**
8246
+ * The type of marker to set on the given range of text.
8247
+ */
8248
+ type: ('spelling' | 'grammar');
8249
+ /**
8250
+ * Start offset into the element's rendered text in UTF-16 code units.
8251
+ * For a text control, an offset into the control's value.
8252
+ * Offsets count text in DOM order and do not enter shadow trees.
8253
+ * To mark text inside a shadow tree, pass the element inside the shadow tree.
8254
+ */
8255
+ start: integer;
8256
+ /**
8257
+ * End offset (exclusive) in the same units and space as start.
8258
+ */
8259
+ end: integer;
8260
+ }
8261
+
8221
8262
  /**
8222
8263
  * Fired when `Element`'s attribute is modified.
8223
8264
  */