DOMException.hx 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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\DOMException.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `DOMException` interface represents an abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
  26. Documentation [DOMException](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/DOMException$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/DOMException>
  28. **/
  29. @:native("DOMException")
  30. extern class DOMException {
  31. static inline var INDEX_SIZE_ERR : Int = 1;
  32. static inline var DOMSTRING_SIZE_ERR : Int = 2;
  33. static inline var HIERARCHY_REQUEST_ERR : Int = 3;
  34. static inline var WRONG_DOCUMENT_ERR : Int = 4;
  35. static inline var INVALID_CHARACTER_ERR : Int = 5;
  36. static inline var NO_DATA_ALLOWED_ERR : Int = 6;
  37. static inline var NO_MODIFICATION_ALLOWED_ERR : Int = 7;
  38. static inline var NOT_FOUND_ERR : Int = 8;
  39. static inline var NOT_SUPPORTED_ERR : Int = 9;
  40. static inline var INUSE_ATTRIBUTE_ERR : Int = 10;
  41. static inline var INVALID_STATE_ERR : Int = 11;
  42. static inline var SYNTAX_ERR : Int = 12;
  43. static inline var INVALID_MODIFICATION_ERR : Int = 13;
  44. static inline var NAMESPACE_ERR : Int = 14;
  45. static inline var INVALID_ACCESS_ERR : Int = 15;
  46. static inline var VALIDATION_ERR : Int = 16;
  47. static inline var TYPE_MISMATCH_ERR : Int = 17;
  48. static inline var SECURITY_ERR : Int = 18;
  49. static inline var NETWORK_ERR : Int = 19;
  50. static inline var ABORT_ERR : Int = 20;
  51. static inline var URL_MISMATCH_ERR : Int = 21;
  52. static inline var QUOTA_EXCEEDED_ERR : Int = 22;
  53. static inline var TIMEOUT_ERR : Int = 23;
  54. static inline var INVALID_NODE_TYPE_ERR : Int = 24;
  55. static inline var DATA_CLONE_ERR : Int = 25;
  56. /**
  57. Returns a `DOMString` that contains one of the strings associated with an error name.
  58. **/
  59. var name(default,null) : String;
  60. /**
  61. Returns a `DOMString` representing a message or description associated with the given error name.
  62. **/
  63. var message(default,null) : String;
  64. /**
  65. Returns a `short` that contains one of the `Error codes`, or `0` if none match. This field is used for historical reasons. New DOM exceptions don't use this anymore: they put this info in the `DOMException.name` attribute.
  66. **/
  67. var code(default,null) : Int;
  68. var result(default,null) : Int;
  69. var filename(default,null) : String;
  70. var lineNumber(default,null) : Int;
  71. var columnNumber(default,null) : Int;
  72. var data(default,null) : Dynamic;
  73. var stack(default,null) : String;
  74. /** @throws DOMError */
  75. function new( message : String = "", ?name : String ) : Void;
  76. }