Skip to content

Commit

Permalink
docs: Describe DOMException
Browse files Browse the repository at this point in the history
  • Loading branch information
karfau committed Jan 17, 2021
1 parent 80f62a5 commit 48ebdaa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
14 changes: 6 additions & 8 deletions lib/dom.js
Original file line number Diff line number Diff line change
@@ -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
20 changes: 19 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
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

0 comments on commit 48ebdaa

Please sign in to comment.