From a4a9ae85712c8cb2d3853b7fb3444ab31b7c6f9b Mon Sep 17 00:00:00 2001 From: Aria Stewart Date: Sun, 30 Jan 2011 22:30:36 -0700 Subject: [PATCH] Fix level1 error messages --- lib/jsdom/level1/core.js | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/jsdom/level1/core.js b/lib/jsdom/level1/core.js index 5d76880afb..ae657423e4 100644 --- a/lib/jsdom/level1/core.js +++ b/lib/jsdom/level1/core.js @@ -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;