SecurityPolicyViolationEvent.hx 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (C)2005-2018 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. /**
  33. A `USVString` representing the URI of the document or worker in which the violation was found.
  34. **/
  35. var documentURI(default,null) : String;
  36. /**
  37. A `USVString` representing the referrer of the resources whose policy was violated. This will be a URL or `null`.
  38. **/
  39. var referrer(default,null) : String;
  40. /**
  41. A `USVString` representing the URI of the resource that was blocked because it violates a policy.
  42. **/
  43. var blockedURI(default,null) : String;
  44. /**
  45. A `DOMString` representing the directive whose enforcement uncovered the violation.
  46. **/
  47. var violatedDirective(default,null) : String;
  48. /**
  49. A `DOMString` representing the directive whose enforcement uncovered the violation.
  50. **/
  51. var effectiveDirective(default,null) : String;
  52. /**
  53. A `DOMString` containing the policy whose enforcement uncovered the violation.
  54. **/
  55. var originalPolicy(default,null) : String;
  56. /**
  57. A `USVString` representing the URI of the document or worker in which the violation was found.
  58. **/
  59. var sourceFile(default,null) : String;
  60. /**
  61. 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.
  62. **/
  63. var sample(default,null) : String;
  64. /**
  65. Indicates how the violated policy is configured to be treated by the user agent. This will be `"enforce"` or `"report"`.
  66. **/
  67. var disposition(default,null) : SecurityPolicyViolationEventDisposition;
  68. /**
  69. A number representing the HTTP status code of the document or worker in which the violation occurred.
  70. **/
  71. var statusCode(default,null) : Int;
  72. /**
  73. The line number in the document or worker at which the violation occurred.
  74. **/
  75. var lineNumber(default,null) : Int;
  76. /**
  77. The column number in the document or worker at which the violation occurred.
  78. **/
  79. var columnNumber(default,null) : Int;
  80. /** @throws DOMError */
  81. function new( type : String, ?eventInitDict : SecurityPolicyViolationEventInit ) : Void;
  82. }