SecurityPolicyViolationEvent.hx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\SecurityPolicyViolationEvent.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `SecurityPolicyViolationEvent` interface inherits from `Event`, and represents the event object of an event sent on a document or worker when its content security policy is violated.
  26. Documentation [SecurityPolicyViolationEvent](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/SecurityPolicyViolationEvent>
  28. **/
  29. @:native("SecurityPolicyViolationEvent")
  30. extern class SecurityPolicyViolationEvent extends Event {
  31. /**
  32. A `USVString` representing the URI of the document or worker in which the violation was found.
  33. **/
  34. var documentURI(default,null) : String;
  35. /**
  36. A `USVString` representing the referrer of the resources whose policy was violated. This will be a URL or `null`.
  37. **/
  38. var referrer(default,null) : String;
  39. /**
  40. A `USVString` representing the URI of the resource that was blocked because it violates a policy.
  41. **/
  42. var blockedURI(default,null) : String;
  43. /**
  44. A `DOMString` representing the directive whose enforcement uncovered the violation.
  45. **/
  46. var violatedDirective(default,null) : String;
  47. /**
  48. A `DOMString` representing the directive whose enforcement uncovered the violation.
  49. **/
  50. var effectiveDirective(default,null) : String;
  51. /**
  52. A `DOMString` containing the policy whose enforcement uncovered the violation.
  53. **/
  54. var originalPolicy(default,null) : String;
  55. /**
  56. A `USVString` representing the URI of the document or worker in which the violation was found.
  57. **/
  58. var sourceFile(default,null) : String;
  59. /**
  60. A `DOMString` representing a sample of the resource that caused the violation, usually the first 40 characters. This will only be populated if the resource is an inline script, event handler, or style — external resources causing a violation will not generate a sample.
  61. **/
  62. var sample(default,null) : String;
  63. /**
  64. Indicates how the violated policy is configured to be treated by the user agent. This will be `"enforce"` or `"report"`.
  65. **/
  66. var disposition(default,null) : SecurityPolicyViolationEventDisposition;
  67. /**
  68. A number representing the HTTP status code of the document or worker in which the violation occurred.
  69. **/
  70. var statusCode(default,null) : Int;
  71. /**
  72. The line number in the document or worker at which the violation occurred.
  73. **/
  74. var lineNumber(default,null) : Int;
  75. /**
  76. The column number in the document or worker at which the violation occurred.
  77. **/
  78. var columnNumber(default,null) : Int;
  79. /** @throws DOMError */
  80. function new( type : String, ?eventInitDict : SecurityPolicyViolationEventInit ) : Void;
  81. }