Permalink
Browse files

Fix level1 error messages

  • Loading branch information...
1 parent 7becb55 commit a4a9ae85712c8cb2d3853b7fb3444ab31b7c6f9b @aredridel aredridel committed Jan 31, 2011
Showing with 11 additions and 12 deletions.
  1. +11 −12 lib/jsdom/level1/core.js
View
@@ -92,18 +92,17 @@ var INDEX_SIZE_ERR = core.INDEX_SIZE_ERR = 1,
DOCUMENT_FRAGMENT_NODE = 11,
NOTATION_NODE = 12;
-core.exceptionMessages = {
- INDEX_SIZE_ERR : "Index size error",
- DOMSTRING_SIZE_ERR : "DOMString size error",
- HIERARCHY_REQUEST_ERR : "Heirarchy request error",
- WRONG_DOCUMENT_ERR : "Wrong document",
- INVALID_CHARACTER_ERR : "Invalid character",
- NO_DATA_ALLOWED_ERR : "No data allowed",
- NO_MODIFICATION_ALLOWED_ERR : "No modification allowed",
- NOT_FOUND_ERR : "Not found",
- NOT_SUPPORTED_ERR : "Not supported",
- INUSE_ATTRIBUTE_ERR : "Attribute in use"
-};
+var messages = core.exceptionMessages = { };
+messages[INDEX_SIZE_ERR] = "Index size error";
+messages[DOMSTRING_SIZE_ERR] = "DOMString size error";
+messages[HIERARCHY_REQUEST_ERR] = "Heirarchy request error";
+messages[WRONG_DOCUMENT_ERR] = "Wrong document";
+messages[INVALID_CHARACTER_ERR] = "Invalid character";
+messages[NO_DATA_ALLOWED_ERR] = "No data allowed";
+messages[NO_MODIFICATION_ALLOWED_ERR] = "No modification allowed";
+messages[NOT_FOUND_ERR] = "Not found";
+messages[NOT_SUPPORTED_ERR] = "Not supported";
+messages[INUSE_ATTRIBUTE_ERR] = "Attribute in use";
core.DOMException = function(code, message) {
this.code = code;

0 comments on commit a4a9ae8

Please sign in to comment.