Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/third_party/closure/goog/testing/cspviolationobserver_externs.js
4058 views
1
/**
2
* @license
3
* Copyright The Closure Library Authors.
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
/**
7
* @fileoverview Externs used by cspviolationobserver.js that are not available
8
* in the open-source Closure compiler release. This file should be deleted
9
* once w3c_reporting_observer.js is available in open-source externs.
10
*
11
* @externs
12
*/
13
14
// TODO(user): Remove this file once w3c_reporting_observer.js is
15
// available in the open-source Closure compiler.
16
17
/**
18
* https://w3c.github.io/reporting/#interface-reporting-observer
19
* @constructor
20
* @param {!ReportingObserverCallback} callback
21
* @param {!ReportingObserverOptions} opts
22
*/
23
function ReportingObserver2(callback, opts) {}
24
/** @return {void} */
25
ReportingObserver2.prototype.observe = function() {};
26
/** @return {void} */
27
ReportingObserver2.prototype.disconnect = function() {};
28
/** @return {!Array<!Report>} */
29
ReportingObserver2.prototype.takeRecords = function() {};
30
31
/**
32
* @typedef {ReportingObserver2|ReportingObserver}
33
* @suppress {duplicate}
34
*/
35
var ReportingObserver;
36
37
38
/**
39
* @typedef {!function(!Array<Report>, !ReportingObserver): void}
40
* @suppress {duplicate}
41
*/
42
var ReportingObserverCallback;
43
44
45
/**
46
* @constructor
47
*/
48
function ReportingObserverOptions2() {}
49
/** @type {undefined|!Array<string>} */
50
ReportingObserverOptions2.prototype.types;
51
/** @type {boolean} */
52
ReportingObserverOptions2.prototype.buffered;
53
54
/**
55
* @typedef {ReportingObserverOptions2|ReportingObserverOptions}
56
* @suppress {duplicate}
57
*/
58
var ReportingObserverOptions;
59
60
61
/**
62
* @constructor
63
* @suppress {duplicate}
64
*/
65
function Report2() {}
66
/** @type {string} */ Report2.prototype.type;
67
/** @type {string} */ Report2.prototype.url;
68
/** @type {?ReportBody} */ Report2.prototype.body;
69
70
/**
71
* @typedef {Report2|Report}
72
* @suppress {duplicate}
73
*/
74
var Report;
75
76
77
/**
78
* @constructor
79
*/
80
function ReportBody2() {}
81
82
/**
83
* @typedef {ReportBody2|ReportBody2}
84
* @suppress {duplicate}
85
*/
86
var ReportBody;
87
88