chrome-types 0.1.429 → 0.1.430

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.
Files changed (3) hide show
  1. package/_all.d.ts +218 -48
  2. package/index.d.ts +218 -48
  3. package/package.json +2 -2
package/_all.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed May 20 2026 22:47:19 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5d7c0421e032b7a8023c0cb244c34c796d40a2be
17
+ // Generated on Thu Jun 25 2026 22:48:21 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 40eff249d43ce574d7772af8be25f8d7a66e8e70
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -753,7 +753,7 @@ declare namespace chrome {
753
753
  /**
754
754
  * Whether the alarm should persist across sessions (browser restarts).
755
755
  *
756
- * @since Pending
756
+ * @since Chrome 150
757
757
  */
758
758
  persistAcrossSessions: boolean;
759
759
  }
@@ -778,7 +778,7 @@ declare namespace chrome {
778
778
  /**
779
779
  * Whether the alarm should persist across sessions (browser restarts). In Chrome, this defaults to true to match historical behavior, but you should set this explicitly to maximize compatibility across browsers.
780
780
  *
781
- * @since Pending
781
+ * @since Chrome 150
782
782
  */
783
783
  persistAcrossSessions?: boolean;
784
784
  }
@@ -9765,26 +9765,69 @@ declare namespace chrome {
9765
9765
  /**
9766
9766
  * Gets the content of the resource.
9767
9767
  *
9768
- * @param callback A function that receives resource content when the request completes.
9768
+ * @chrome-returns-extra since Pending
9769
+ * @returns A function that receives resource content when the request completes.
9770
+ */
9771
+ getContent(): Promise<{
9772
+
9773
+ /**
9774
+ * Content of the resource (potentially encoded).
9775
+ */
9776
+ content: string,
9777
+
9778
+ /**
9779
+ * Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
9780
+ */
9781
+ encoding: string,
9782
+ }>;
9783
+
9784
+ /**
9785
+ * Gets the content of the resource.
9769
9786
  */
9770
9787
  getContent(
9771
9788
 
9772
9789
  /**
9773
- * @param content Content of the resource (potentially encoded).
9774
- * @param encoding Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
9790
+ * @param response An object containing the resource content and its encoding.
9775
9791
  */
9776
- callback: (
9777
- content: string,
9778
- encoding: string,
9792
+ callback?: (
9793
+ /**
9794
+ * @since Pending
9795
+ */
9796
+ response: {
9797
+
9798
+ /**
9799
+ * Content of the resource (potentially encoded).
9800
+ */
9801
+ content: string,
9802
+
9803
+ /**
9804
+ * Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
9805
+ */
9806
+ encoding: string,
9807
+ },
9779
9808
  ) => void,
9780
9809
  ): void;
9781
9810
 
9811
+ /**
9812
+ * Sets the content of the resource.
9813
+ *
9814
+ * @chrome-returns-extra since Pending
9815
+ * @param content New content of the resource. Only resources with the text type are currently supported.
9816
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
9817
+ * @returns A function called upon request completion.
9818
+ */
9819
+ setContent(
9820
+
9821
+ content: string,
9822
+
9823
+ commit: boolean,
9824
+ ): Promise<{[name: string]: any} | undefined>;
9825
+
9782
9826
  /**
9783
9827
  * Sets the content of the resource.
9784
9828
  *
9785
9829
  * @param content New content of the resource. Only resources with the text type are currently supported.
9786
9830
  * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
9787
- * @param callback A function called upon request completion.
9788
9831
  */
9789
9832
  setContent(
9790
9833
 
@@ -9823,12 +9866,86 @@ declare namespace chrome {
9823
9866
 
9824
9867
  export {_eval as eval};
9825
9868
 
9869
+ /**
9870
+ * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the `result` parameter of the callback is `undefined`. In the case of a DevTools-side error, the `isException` parameter is non-null and has `isError` set to true and `code` set to an error code. In the case of a JavaScript error, `isException` is set to true and `value` is set to the string value of thrown object.
9871
+ *
9872
+ * @chrome-returns-extra since Pending
9873
+ * @param expression An expression to evaluate.
9874
+ * @param options The options parameter can contain one or more options.
9875
+ * @returns A function called when evaluation completes.
9876
+ */
9877
+ function _eval(
9878
+
9879
+ expression: string,
9880
+
9881
+ options?: {
9882
+
9883
+ /**
9884
+ * If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page.
9885
+ */
9886
+ frameURL?: string,
9887
+
9888
+ /**
9889
+ * Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the `isError` field set to true and the `code` field set to `E_NOTFOUND`.
9890
+ */
9891
+ useContentScriptContext?: boolean,
9892
+
9893
+ /**
9894
+ * Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, scriptExecutionContext overrides the 'true' setting on useContentScriptContext.
9895
+ *
9896
+ * @since Chrome 107
9897
+ */
9898
+ scriptExecutionContext?: string,
9899
+ },
9900
+ ): Promise<{
9901
+
9902
+ /**
9903
+ * The result of evaluation.
9904
+ */
9905
+ result: {[name: string]: any},
9906
+
9907
+ /**
9908
+ * An object providing details if an exception occurred while evaluating the expression.
9909
+ */
9910
+ exceptionInfo: {
9911
+
9912
+ /**
9913
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
9914
+ */
9915
+ isError: boolean,
9916
+
9917
+ /**
9918
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
9919
+ */
9920
+ code: string,
9921
+
9922
+ /**
9923
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
9924
+ */
9925
+ description: string,
9926
+
9927
+ /**
9928
+ * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
9929
+ */
9930
+ details: any[],
9931
+
9932
+ /**
9933
+ * Set if the evaluated code produces an unhandled exception.
9934
+ */
9935
+ isException: boolean,
9936
+
9937
+ /**
9938
+ * Set if the evaluated code produces an unhandled exception.
9939
+ */
9940
+ value: string,
9941
+ },
9942
+ }>;
9943
+
9826
9944
  /**
9827
9945
  * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the `result` parameter of the callback is `undefined`. In the case of a DevTools-side error, the `isException` parameter is non-null and has `isError` set to true and `code` set to an error code. In the case of a JavaScript error, `isException` is set to true and `value` is set to the string value of thrown object.
9828
9946
  *
9829
9947
  * @param expression An expression to evaluate.
9830
9948
  * @param options The options parameter can contain one or more options.
9831
- * @param callback A function called when evaluation completes.
9832
9949
  */
9833
9950
  function _eval(
9834
9951
 
@@ -9855,42 +9972,54 @@ declare namespace chrome {
9855
9972
  },
9856
9973
 
9857
9974
  /**
9858
- * @param result The result of evaluation.
9859
- * @param exceptionInfo An object providing details if an exception occurred while evaluating the expression.
9975
+ * @param response The result of evaluation and exception information.
9860
9976
  */
9861
9977
  callback?: (
9862
- result: {[name: string]: any},
9863
- exceptionInfo: {
9978
+ /**
9979
+ * @since Pending
9980
+ */
9981
+ response: {
9864
9982
 
9865
9983
  /**
9866
- * Set if the error occurred on the DevTools side before the expression is evaluated.
9984
+ * The result of evaluation.
9867
9985
  */
9868
- isError: boolean,
9986
+ result: {[name: string]: any},
9869
9987
 
9870
9988
  /**
9871
- * Set if the error occurred on the DevTools side before the expression is evaluated.
9989
+ * An object providing details if an exception occurred while evaluating the expression.
9872
9990
  */
9873
- code: string,
9991
+ exceptionInfo: {
9874
9992
 
9875
- /**
9876
- * Set if the error occurred on the DevTools side before the expression is evaluated.
9877
- */
9878
- description: string,
9993
+ /**
9994
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
9995
+ */
9996
+ isError: boolean,
9879
9997
 
9880
- /**
9881
- * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
9882
- */
9883
- details: any[],
9998
+ /**
9999
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
10000
+ */
10001
+ code: string,
9884
10002
 
9885
- /**
9886
- * Set if the evaluated code produces an unhandled exception.
9887
- */
9888
- isException: boolean,
10003
+ /**
10004
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
10005
+ */
10006
+ description: string,
9889
10007
 
9890
- /**
9891
- * Set if the evaluated code produces an unhandled exception.
9892
- */
9893
- value: string,
10008
+ /**
10009
+ * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
10010
+ */
10011
+ details: any[],
10012
+
10013
+ /**
10014
+ * Set if the evaluated code produces an unhandled exception.
10015
+ */
10016
+ isException: boolean,
10017
+
10018
+ /**
10019
+ * Set if the evaluated code produces an unhandled exception.
10020
+ */
10021
+ value: string,
10022
+ },
9894
10023
  },
9895
10024
  ) => void,
9896
10025
  ): void;
@@ -9922,14 +10051,20 @@ declare namespace chrome {
9922
10051
  /**
9923
10052
  * Retrieves the list of resources from the inspected page.
9924
10053
  *
9925
- * @param callback A function that receives the list of resources when the request completes.
10054
+ * @chrome-returns-extra since Pending
10055
+ * @returns A function that receives the list of resources when the request completes.
10056
+ */
10057
+ export function getResources(): Promise<Resource[]>;
10058
+
10059
+ /**
10060
+ * Retrieves the list of resources from the inspected page.
9926
10061
  */
9927
10062
  export function getResources(
9928
10063
 
9929
10064
  /**
9930
10065
  * @param resources The resources within the page.
9931
10066
  */
9932
- callback: (
10067
+ callback?: (
9933
10068
  resources: Resource[],
9934
10069
  ) => void,
9935
10070
  ): void;
@@ -9950,17 +10085,46 @@ declare namespace chrome {
9950
10085
  /**
9951
10086
  * Returns content of the response body.
9952
10087
  *
9953
- * @param callback A function that receives the response body when the request completes.
10088
+ * @chrome-returns-extra since Pending
10089
+ * @returns A function that receives the response body when the request completes.
10090
+ */
10091
+ getContent(): Promise<{
10092
+
10093
+ /**
10094
+ * Content of the response body (potentially encoded).
10095
+ */
10096
+ content: string,
10097
+
10098
+ /**
10099
+ * Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
10100
+ */
10101
+ encoding: string,
10102
+ }>;
10103
+
10104
+ /**
10105
+ * Returns content of the response body.
9954
10106
  */
9955
10107
  getContent(
9956
10108
 
9957
10109
  /**
9958
- * @param content Content of the response body (potentially encoded).
9959
- * @param encoding Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
10110
+ * @param response An object containing the response body and its encoding.
9960
10111
  */
9961
- callback: (
9962
- content: string,
9963
- encoding: string,
10112
+ callback?: (
10113
+ /**
10114
+ * @since Pending
10115
+ */
10116
+ response: {
10117
+
10118
+ /**
10119
+ * Content of the response body (potentially encoded).
10120
+ */
10121
+ content: string,
10122
+
10123
+ /**
10124
+ * Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
10125
+ */
10126
+ encoding: string,
10127
+ },
9964
10128
  ) => void,
9965
10129
  ): void;
9966
10130
  }
@@ -9982,14 +10146,20 @@ declare namespace chrome {
9982
10146
  /**
9983
10147
  * Returns HAR log that contains all known network requests.
9984
10148
  *
9985
- * @param callback A function that receives the HAR log when the request completes.
10149
+ * @chrome-returns-extra since Pending
10150
+ * @returns A function that receives the HAR log when the request completes.
10151
+ */
10152
+ export function getHAR(): Promise<{[name: string]: any}>;
10153
+
10154
+ /**
10155
+ * Returns HAR log that contains all known network requests.
9986
10156
  */
9987
10157
  export function getHAR(
9988
10158
 
9989
10159
  /**
9990
10160
  * @param harLog A HAR log. See HAR specification for details.
9991
10161
  */
9992
- callback: (
10162
+ callback?: (
9993
10163
  harLog: {[name: string]: any},
9994
10164
  ) => void,
9995
10165
  ): void;
@@ -22122,14 +22292,14 @@ declare namespace chrome {
22122
22292
  * Determines whether the extension has an active document.
22123
22293
  *
22124
22294
  * @returns Promise that resolves with the result of whether the extension has an active offscreen document.
22125
- * @since Pending
22295
+ * @since Chrome 150
22126
22296
  */
22127
22297
  export function hasDocument(): Promise<boolean>;
22128
22298
 
22129
22299
  /**
22130
22300
  * Determines whether the extension has an active document.
22131
22301
  *
22132
- * @since Pending
22302
+ * @since Chrome 150
22133
22303
  */
22134
22304
  export function hasDocument(
22135
22305
 
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Wed May 20 2026 22:47:15 GMT+0000 (Coordinated Universal Time)
18
- // Built at 5d7c0421e032b7a8023c0cb244c34c796d40a2be
17
+ // Generated on Thu Jun 25 2026 22:48:17 GMT+0000 (Coordinated Universal Time)
18
+ // Built at 40eff249d43ce574d7772af8be25f8d7a66e8e70
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -811,7 +811,7 @@ declare namespace chrome {
811
811
  /**
812
812
  * Whether the alarm should persist across sessions (browser restarts).
813
813
  *
814
- * @since Pending
814
+ * @since Chrome 150
815
815
  */
816
816
  persistAcrossSessions: boolean;
817
817
  }
@@ -836,7 +836,7 @@ declare namespace chrome {
836
836
  /**
837
837
  * Whether the alarm should persist across sessions (browser restarts). In Chrome, this defaults to true to match historical behavior, but you should set this explicitly to maximize compatibility across browsers.
838
838
  *
839
- * @since Pending
839
+ * @since Chrome 150
840
840
  */
841
841
  persistAcrossSessions?: boolean;
842
842
  }
@@ -6031,26 +6031,69 @@ declare namespace chrome {
6031
6031
  /**
6032
6032
  * Gets the content of the resource.
6033
6033
  *
6034
- * @param callback A function that receives resource content when the request completes.
6034
+ * @chrome-returns-extra since Pending
6035
+ * @returns A function that receives resource content when the request completes.
6036
+ */
6037
+ getContent(): Promise<{
6038
+
6039
+ /**
6040
+ * Content of the resource (potentially encoded).
6041
+ */
6042
+ content: string,
6043
+
6044
+ /**
6045
+ * Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6046
+ */
6047
+ encoding: string,
6048
+ }>;
6049
+
6050
+ /**
6051
+ * Gets the content of the resource.
6035
6052
  */
6036
6053
  getContent(
6037
6054
 
6038
6055
  /**
6039
- * @param content Content of the resource (potentially encoded).
6040
- * @param encoding Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6056
+ * @param response An object containing the resource content and its encoding.
6041
6057
  */
6042
- callback: (
6043
- content: string,
6044
- encoding: string,
6058
+ callback?: (
6059
+ /**
6060
+ * @since Pending
6061
+ */
6062
+ response: {
6063
+
6064
+ /**
6065
+ * Content of the resource (potentially encoded).
6066
+ */
6067
+ content: string,
6068
+
6069
+ /**
6070
+ * Empty if the content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6071
+ */
6072
+ encoding: string,
6073
+ },
6045
6074
  ) => void,
6046
6075
  ): void;
6047
6076
 
6077
+ /**
6078
+ * Sets the content of the resource.
6079
+ *
6080
+ * @chrome-returns-extra since Pending
6081
+ * @param content New content of the resource. Only resources with the text type are currently supported.
6082
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
6083
+ * @returns A function called upon request completion.
6084
+ */
6085
+ setContent(
6086
+
6087
+ content: string,
6088
+
6089
+ commit: boolean,
6090
+ ): Promise<{[name: string]: any} | undefined>;
6091
+
6048
6092
  /**
6049
6093
  * Sets the content of the resource.
6050
6094
  *
6051
6095
  * @param content New content of the resource. Only resources with the text type are currently supported.
6052
6096
  * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
6053
- * @param callback A function called upon request completion.
6054
6097
  */
6055
6098
  setContent(
6056
6099
 
@@ -6089,12 +6132,86 @@ declare namespace chrome {
6089
6132
 
6090
6133
  export {_eval as eval};
6091
6134
 
6135
+ /**
6136
+ * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the `result` parameter of the callback is `undefined`. In the case of a DevTools-side error, the `isException` parameter is non-null and has `isError` set to true and `code` set to an error code. In the case of a JavaScript error, `isException` is set to true and `value` is set to the string value of thrown object.
6137
+ *
6138
+ * @chrome-returns-extra since Pending
6139
+ * @param expression An expression to evaluate.
6140
+ * @param options The options parameter can contain one or more options.
6141
+ * @returns A function called when evaluation completes.
6142
+ */
6143
+ function _eval(
6144
+
6145
+ expression: string,
6146
+
6147
+ options?: {
6148
+
6149
+ /**
6150
+ * If specified, the expression is evaluated on the iframe whose URL matches the one specified. By default, the expression is evaluated in the top frame of the inspected page.
6151
+ */
6152
+ frameURL?: string,
6153
+
6154
+ /**
6155
+ * Evaluate the expression in the context of the content script of the calling extension, provided that the content script is already injected into the inspected page. If not, the expression is not evaluated and the callback is invoked with the exception parameter set to an object that has the `isError` field set to true and the `code` field set to `E_NOTFOUND`.
6156
+ */
6157
+ useContentScriptContext?: boolean,
6158
+
6159
+ /**
6160
+ * Evaluate the expression in the context of a content script of an extension that matches the specified origin. If given, scriptExecutionContext overrides the 'true' setting on useContentScriptContext.
6161
+ *
6162
+ * @since Chrome 107
6163
+ */
6164
+ scriptExecutionContext?: string,
6165
+ },
6166
+ ): Promise<{
6167
+
6168
+ /**
6169
+ * The result of evaluation.
6170
+ */
6171
+ result: {[name: string]: any},
6172
+
6173
+ /**
6174
+ * An object providing details if an exception occurred while evaluating the expression.
6175
+ */
6176
+ exceptionInfo: {
6177
+
6178
+ /**
6179
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6180
+ */
6181
+ isError: boolean,
6182
+
6183
+ /**
6184
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6185
+ */
6186
+ code: string,
6187
+
6188
+ /**
6189
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6190
+ */
6191
+ description: string,
6192
+
6193
+ /**
6194
+ * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
6195
+ */
6196
+ details: any[],
6197
+
6198
+ /**
6199
+ * Set if the evaluated code produces an unhandled exception.
6200
+ */
6201
+ isException: boolean,
6202
+
6203
+ /**
6204
+ * Set if the evaluated code produces an unhandled exception.
6205
+ */
6206
+ value: string,
6207
+ },
6208
+ }>;
6209
+
6092
6210
  /**
6093
6211
  * Evaluates a JavaScript expression in the context of the main frame of the inspected page. The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown. The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation. In either case, the `result` parameter of the callback is `undefined`. In the case of a DevTools-side error, the `isException` parameter is non-null and has `isError` set to true and `code` set to an error code. In the case of a JavaScript error, `isException` is set to true and `value` is set to the string value of thrown object.
6094
6212
  *
6095
6213
  * @param expression An expression to evaluate.
6096
6214
  * @param options The options parameter can contain one or more options.
6097
- * @param callback A function called when evaluation completes.
6098
6215
  */
6099
6216
  function _eval(
6100
6217
 
@@ -6121,42 +6238,54 @@ declare namespace chrome {
6121
6238
  },
6122
6239
 
6123
6240
  /**
6124
- * @param result The result of evaluation.
6125
- * @param exceptionInfo An object providing details if an exception occurred while evaluating the expression.
6241
+ * @param response The result of evaluation and exception information.
6126
6242
  */
6127
6243
  callback?: (
6128
- result: {[name: string]: any},
6129
- exceptionInfo: {
6244
+ /**
6245
+ * @since Pending
6246
+ */
6247
+ response: {
6130
6248
 
6131
6249
  /**
6132
- * Set if the error occurred on the DevTools side before the expression is evaluated.
6250
+ * The result of evaluation.
6133
6251
  */
6134
- isError: boolean,
6252
+ result: {[name: string]: any},
6135
6253
 
6136
6254
  /**
6137
- * Set if the error occurred on the DevTools side before the expression is evaluated.
6255
+ * An object providing details if an exception occurred while evaluating the expression.
6138
6256
  */
6139
- code: string,
6257
+ exceptionInfo: {
6140
6258
 
6141
- /**
6142
- * Set if the error occurred on the DevTools side before the expression is evaluated.
6143
- */
6144
- description: string,
6259
+ /**
6260
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6261
+ */
6262
+ isError: boolean,
6145
6263
 
6146
- /**
6147
- * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
6148
- */
6149
- details: any[],
6264
+ /**
6265
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6266
+ */
6267
+ code: string,
6150
6268
 
6151
- /**
6152
- * Set if the evaluated code produces an unhandled exception.
6153
- */
6154
- isException: boolean,
6269
+ /**
6270
+ * Set if the error occurred on the DevTools side before the expression is evaluated.
6271
+ */
6272
+ description: string,
6155
6273
 
6156
- /**
6157
- * Set if the evaluated code produces an unhandled exception.
6158
- */
6159
- value: string,
6274
+ /**
6275
+ * Set if the error occurred on the DevTools side before the expression is evaluated, contains the array of the values that may be substituted into the description string to provide more information about the cause of the error.
6276
+ */
6277
+ details: any[],
6278
+
6279
+ /**
6280
+ * Set if the evaluated code produces an unhandled exception.
6281
+ */
6282
+ isException: boolean,
6283
+
6284
+ /**
6285
+ * Set if the evaluated code produces an unhandled exception.
6286
+ */
6287
+ value: string,
6288
+ },
6160
6289
  },
6161
6290
  ) => void,
6162
6291
  ): void;
@@ -6188,14 +6317,20 @@ declare namespace chrome {
6188
6317
  /**
6189
6318
  * Retrieves the list of resources from the inspected page.
6190
6319
  *
6191
- * @param callback A function that receives the list of resources when the request completes.
6320
+ * @chrome-returns-extra since Pending
6321
+ * @returns A function that receives the list of resources when the request completes.
6322
+ */
6323
+ export function getResources(): Promise<Resource[]>;
6324
+
6325
+ /**
6326
+ * Retrieves the list of resources from the inspected page.
6192
6327
  */
6193
6328
  export function getResources(
6194
6329
 
6195
6330
  /**
6196
6331
  * @param resources The resources within the page.
6197
6332
  */
6198
- callback: (
6333
+ callback?: (
6199
6334
  resources: Resource[],
6200
6335
  ) => void,
6201
6336
  ): void;
@@ -6216,17 +6351,46 @@ declare namespace chrome {
6216
6351
  /**
6217
6352
  * Returns content of the response body.
6218
6353
  *
6219
- * @param callback A function that receives the response body when the request completes.
6354
+ * @chrome-returns-extra since Pending
6355
+ * @returns A function that receives the response body when the request completes.
6356
+ */
6357
+ getContent(): Promise<{
6358
+
6359
+ /**
6360
+ * Content of the response body (potentially encoded).
6361
+ */
6362
+ content: string,
6363
+
6364
+ /**
6365
+ * Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6366
+ */
6367
+ encoding: string,
6368
+ }>;
6369
+
6370
+ /**
6371
+ * Returns content of the response body.
6220
6372
  */
6221
6373
  getContent(
6222
6374
 
6223
6375
  /**
6224
- * @param content Content of the response body (potentially encoded).
6225
- * @param encoding Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6376
+ * @param response An object containing the response body and its encoding.
6226
6377
  */
6227
- callback: (
6228
- content: string,
6229
- encoding: string,
6378
+ callback?: (
6379
+ /**
6380
+ * @since Pending
6381
+ */
6382
+ response: {
6383
+
6384
+ /**
6385
+ * Content of the response body (potentially encoded).
6386
+ */
6387
+ content: string,
6388
+
6389
+ /**
6390
+ * Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
6391
+ */
6392
+ encoding: string,
6393
+ },
6230
6394
  ) => void,
6231
6395
  ): void;
6232
6396
  }
@@ -6248,14 +6412,20 @@ declare namespace chrome {
6248
6412
  /**
6249
6413
  * Returns HAR log that contains all known network requests.
6250
6414
  *
6251
- * @param callback A function that receives the HAR log when the request completes.
6415
+ * @chrome-returns-extra since Pending
6416
+ * @returns A function that receives the HAR log when the request completes.
6417
+ */
6418
+ export function getHAR(): Promise<{[name: string]: any}>;
6419
+
6420
+ /**
6421
+ * Returns HAR log that contains all known network requests.
6252
6422
  */
6253
6423
  export function getHAR(
6254
6424
 
6255
6425
  /**
6256
6426
  * @param harLog A HAR log. See HAR specification for details.
6257
6427
  */
6258
- callback: (
6428
+ callback?: (
6259
6429
  harLog: {[name: string]: any},
6260
6430
  ) => void,
6261
6431
  ): void;
@@ -15206,14 +15376,14 @@ declare namespace chrome {
15206
15376
  * Determines whether the extension has an active document.
15207
15377
  *
15208
15378
  * @returns Promise that resolves with the result of whether the extension has an active offscreen document.
15209
- * @since Pending
15379
+ * @since Chrome 150
15210
15380
  */
15211
15381
  export function hasDocument(): Promise<boolean>;
15212
15382
 
15213
15383
  /**
15214
15384
  * Determines whether the extension has an active document.
15215
15385
  *
15216
- * @since Pending
15386
+ * @since Chrome 150
15217
15387
  */
15218
15388
  export function hasDocument(
15219
15389
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "19dc923f2aec2193"
8
+ "build-hash": "4997499173c6e434"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "url": "https://github.com/GoogleChrome/chrome-types/issues"
17
17
  },
18
18
  "homepage": "https://github.com/GoogleChrome/chrome-types",
19
- "version": "0.1.429"
19
+ "version": "0.1.430"
20
20
  }