Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export DOMException; remove custom assertions; etc. #174

Merged
merged 14 commits into from Jan 17, 2021
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions lib/dom.js
@@ -1,10 +1,3 @@
/*
* DOM Level 2
* Object DOMException
* @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
*/

function copy(src,dest){
for(var p in src){
dest[p] = src[p];
Expand Down Expand Up @@ -66,7 +59,12 @@ var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((Exce
var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);


/**
* DOM Level 2
* Object DOMException
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
* @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
*/
function DOMException(code, message) {
if(message instanceof Error){
var error = message;
Expand Down Expand Up @@ -1251,6 +1249,7 @@ try{

//if(typeof require == 'function'){
exports.Node = Node;
exports.DOMException = DOMException;
brodybits marked this conversation as resolved.
Show resolved Hide resolved
exports.DOMImplementation = DOMImplementation;
exports.XMLSerializer = XMLSerializer;
//}
20 changes: 19 additions & 1 deletion readme.md
Expand Up @@ -98,6 +98,23 @@ DOM level2 method and attribute:
normalize()
isSupported(feature, version)
hasAttributes()
* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)
* used as the Error type thrown as part of DOM API:
1. Index size error
2. DOMString size error
3. Hierarchy request error
4. Wrong document
5. Invalid character
6. No data allowed
7. No modification allowed
8. Not found
9. Not supported
10. Attribute in use
11. Invalid state
12. Syntax error
13. Invalid modification
14. Invalid namespace
15. Invalid access

* [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)

Expand Down Expand Up @@ -228,7 +245,8 @@ DOM level 3 support:

DOM extension by xmldom
---
* [Node] Source position extension;

* [Node] Source position extension;

attribute:
//Numbered starting from '1'
Expand Down
130 changes: 0 additions & 130 deletions test/assert.js

This file was deleted.