1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/.
5 * The origin of this IDL file is
6 * https://w3c.github.io/webappsec-csp/#violation-events
9 enum SecurityPolicyViolationEventDisposition
15 interface SecurityPolicyViolationEvent : Event
17 constructor(DOMString type,
18 optional SecurityPolicyViolationEventInit eventInitDict = {});
20 readonly attribute DOMString documentURI;
21 readonly attribute DOMString referrer;
22 readonly attribute DOMString blockedURI;
23 readonly attribute DOMString violatedDirective; // historical alias of effectiveDirective
24 readonly attribute DOMString effectiveDirective;
25 readonly attribute DOMString originalPolicy;
26 readonly attribute DOMString sourceFile;
27 readonly attribute DOMString sample;
28 readonly attribute SecurityPolicyViolationEventDisposition disposition;
29 readonly attribute unsigned short statusCode;
30 readonly attribute unsigned long lineNumber;
31 readonly attribute unsigned long columnNumber;
34 [GenerateInitFromJSON, GenerateToJSON]
35 dictionary SecurityPolicyViolationEventInit : EventInit
37 DOMString documentURI = "";
38 DOMString referrer = "";
39 DOMString blockedURI = "";
40 DOMString violatedDirective = "";
41 DOMString effectiveDirective = "";
42 DOMString originalPolicy = "";
43 DOMString sourceFile = "";
44 DOMString sample = "";
45 SecurityPolicyViolationEventDisposition disposition = "enforce";
46 unsigned short statusCode = 0;
47 unsigned long lineNumber = 0;
48 unsigned long columnNumber = 0;