mirror of
https://github.com/s4u/maven-settings-action.git
synced 2026-02-17 00:00:20 +08:00
update dependency after merge from master
This commit is contained in:
39
node_modules/@xmldom/xmldom/CHANGELOG.md
generated
vendored
39
node_modules/@xmldom/xmldom/CHANGELOG.md
generated
vendored
@ -4,6 +4,29 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.8.3](https://github.com/xmldom/xmldom/compare/0.8.3...0.8.2)
|
||||
|
||||
### Fixed
|
||||
- Avoid iterating over prototype properties [`#437`](https://github.com/xmldom/xmldom/pull/437) / [`#436`](https://github.com/xmldom/xmldom/issues/436)
|
||||
|
||||
Thank you, [@Supraja9726](https://github.com/Supraja9726) for your contributions
|
||||
|
||||
|
||||
## [0.8.2](https://github.com/xmldom/xmldom/compare/0.8.1...0.8.2)
|
||||
|
||||
### Fixed
|
||||
- fix(dom): Serialize `>` as specified (#395) [`#58`](https://github.com/xmldom/xmldom/issues/58)
|
||||
|
||||
### Other
|
||||
- docs: Add `nodeType` values to public interface description [`#396`](https://github.com/xmldom/xmldom/pull/396)
|
||||
- test: Add executable examples for node and typescript [`#317`](https://github.com/xmldom/xmldom/pull/317)
|
||||
- fix(dom): Serialize `>` as specified [`#395`](https://github.com/xmldom/xmldom/pull/395)
|
||||
- chore: Add minimal `Object.assign` ponyfill [`#379`](https://github.com/xmldom/xmldom/pull/379)
|
||||
- docs: Refine release documentation [`#378`](https://github.com/xmldom/xmldom/pull/378)
|
||||
- chore: update various dev dependencies
|
||||
|
||||
Thank you [@niklasl](https://github.com/niklasl), [@cburatto](https://github.com/cburatto), [@SheetJSDev](https://github.com/SheetJSDev), [@pyrsmk](https://github.com/pyrsmk) for your contributions
|
||||
|
||||
## [0.8.1](https://github.com/xmldom/xmldom/compare/0.8.0...0.8.1)
|
||||
|
||||
### Fixes
|
||||
@ -44,7 +67,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
||||
### Fixes:
|
||||
|
||||
- Preserve default namespace when serializing [`#319`](https://github.com/xmldom/xmldom/issues/319) / [`#321`](https://github.com/xmldom/xmldom/pull/321)
|
||||
Thank you [@lupestro](https://github.com/lupestro)
|
||||
Thank you, [@lupestro](https://github.com/lupestro)
|
||||
|
||||
## 0.7.4
|
||||
|
||||
@ -53,7 +76,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
||||
### Fixes:
|
||||
|
||||
- Restore ability to parse `__prototype__` attributes [`#315`](https://github.com/xmldom/xmldom/pull/315)
|
||||
Thank you [@dsimpsonOMF](https://github.com/dsimpsonOMF)
|
||||
Thank you, [@dsimpsonOMF](https://github.com/dsimpsonOMF)
|
||||
|
||||
## 0.7.3
|
||||
|
||||
@ -63,7 +86,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
||||
|
||||
- Add doctype when parsing from string [`#277`](https://github.com/xmldom/xmldom/issues/277) / [`#301`](https://github.com/xmldom/xmldom/pull/301)
|
||||
- Correct typo in error message [`#294`](https://github.com/xmldom/xmldom/pull/294)
|
||||
Thank you [@rrthomas](https://github.com/rrthomas)
|
||||
Thank you, [@rrthomas](https://github.com/rrthomas)
|
||||
|
||||
### Refactor:
|
||||
|
||||
@ -88,7 +111,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
||||
### Fixes:
|
||||
|
||||
- Types: Add index.d.ts to packaged files [`#288`](https://github.com/xmldom/xmldom/pull/288)
|
||||
Thank you [@forty](https://github.com/forty)
|
||||
Thank you, [@forty](https://github.com/forty)
|
||||
|
||||
## 0.7.1
|
||||
|
||||
@ -97,7 +120,7 @@ Thank you [@marrus-sh](https://github.com/marrus-sh), [@victorandree](https://gi
|
||||
### Fixes:
|
||||
|
||||
- Types: Copy types from DefinitelyTyped [`#283`](https://github.com/xmldom/xmldom/pull/283)
|
||||
Thank you [@kachkaev](https://github.com/kachkaev)
|
||||
Thank you, [@kachkaev](https://github.com/kachkaev)
|
||||
|
||||
### Chore:
|
||||
- package.json: remove author, maintainers, etc. [`#279`](https://github.com/xmldom/xmldom/pull/279)
|
||||
@ -114,7 +137,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
||||
### Fixes:
|
||||
|
||||
- Security: Misinterpretation of malicious XML input [`CVE-2021-32796`](https://github.com/xmldom/xmldom/security/advisories/GHSA-5fg8-2547-mr8q)
|
||||
- Implement `Document.getElementsByClassName` as specified [`#213`](https://github.com/xmldom/xmldom/pull/213), thank you [@ChALkeR](https://github.com/ChALkeR)
|
||||
- Implement `Document.getElementsByClassName` as specified [`#213`](https://github.com/xmldom/xmldom/pull/213), thank you, [@ChALkeR](https://github.com/ChALkeR)
|
||||
- Inherit namespace prefix from parent when required [`#268`](https://github.com/xmldom/xmldom/pull/268)
|
||||
- Handle whitespace in closing tags [`#267`](https://github.com/xmldom/xmldom/pull/267)
|
||||
- Update `DOMImplementation` according to recent specs [`#210`](https://github.com/xmldom/xmldom/pull/210)
|
||||
@ -122,7 +145,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
||||
- No longer serializes any namespaces with an empty URI [`#244`](https://github.com/xmldom/xmldom/pull/244)
|
||||
(related to [`#168`](https://github.com/xmldom/xmldom/pull/168) released in 0.6.0)
|
||||
BREAKING CHANGE: Only if you rely on ["unsetting" a namespace prefix](https://github.com/xmldom/xmldom/pull/168#issuecomment-886984994) by setting it to an empty string
|
||||
- Set `localName` as part of `Document.createElement` [`#229`](https://github.com/xmldom/xmldom/pull/229), thank you [@rrthomas](https://github.com/rrthomas)
|
||||
- Set `localName` as part of `Document.createElement` [`#229`](https://github.com/xmldom/xmldom/pull/229), thank you, [@rrthomas](https://github.com/rrthomas)
|
||||
|
||||
### CI
|
||||
|
||||
@ -141,7 +164,7 @@ For more details look at [`#278`](https://github.com/xmldom/xmldom/pull/278#issu
|
||||
|
||||
- Stop serializing empty namespace values like `xmlns:ds=""` [`#168`](https://github.com/xmldom/xmldom/pull/168)
|
||||
BREAKING CHANGE: If your code expected empty namespaces attributes to be serialized.
|
||||
Thank you [@pdecat](https://github.com/pdecat) and [@FranckDepoortere](https://github.com/FranckDepoortere)
|
||||
Thank you, [@pdecat](https://github.com/pdecat) and [@FranckDepoortere](https://github.com/FranckDepoortere)
|
||||
- Escape `<` to `<` when serializing attribute values [`#198`](https://github.com/xmldom/xmldom/issues/198) / [`#199`](https://github.com/xmldom/xmldom/pull/199)
|
||||
|
||||
## 0.5.0
|
||||
|
||||
26
node_modules/@xmldom/xmldom/lib/conventions.js
generated
vendored
26
node_modules/@xmldom/xmldom/lib/conventions.js
generated
vendored
@ -22,6 +22,31 @@ function freeze(object, oc) {
|
||||
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object
|
||||
}
|
||||
|
||||
/**
|
||||
* Since we can not rely on `Object.assign` we provide a simplified version
|
||||
* that is sufficient for our needs.
|
||||
*
|
||||
* @param {Object} target
|
||||
* @param {Object | null | undefined} source
|
||||
*
|
||||
* @returns {Object} target
|
||||
* @throws TypeError if target is not an object
|
||||
*
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
||||
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
|
||||
*/
|
||||
function assign(target, source) {
|
||||
if (target === null || typeof target !== 'object') {
|
||||
throw new TypeError('target is not an object')
|
||||
}
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key]
|
||||
}
|
||||
}
|
||||
return target
|
||||
}
|
||||
|
||||
/**
|
||||
* All mime types that are allowed as input to `DOMParser.parseFromString`
|
||||
*
|
||||
@ -139,6 +164,7 @@ var NAMESPACE = freeze({
|
||||
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
||||
})
|
||||
|
||||
exports.assign = assign;
|
||||
exports.freeze = freeze;
|
||||
exports.MIME_TYPE = MIME_TYPE;
|
||||
exports.NAMESPACE = NAMESPACE;
|
||||
|
||||
31
node_modules/@xmldom/xmldom/lib/dom.js
generated
vendored
31
node_modules/@xmldom/xmldom/lib/dom.js
generated
vendored
@ -62,7 +62,9 @@ function arrayIncludes (list) {
|
||||
|
||||
function copy(src,dest){
|
||||
for(var p in src){
|
||||
dest[p] = src[p];
|
||||
if (Object.prototype.hasOwnProperty.call(src, p)) {
|
||||
dest[p] = src[p];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -509,9 +511,9 @@ Node.prototype = {
|
||||
//console.dir(map)
|
||||
if(map){
|
||||
for(var n in map){
|
||||
if(map[n] == namespaceURI){
|
||||
return n;
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(map, n) && map[n] === namespaceURI) {
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode;
|
||||
@ -525,7 +527,7 @@ Node.prototype = {
|
||||
var map = el._nsMap;
|
||||
//console.dir(map)
|
||||
if(map){
|
||||
if(prefix in map){
|
||||
if(Object.prototype.hasOwnProperty.call(map, prefix)){
|
||||
return map[prefix] ;
|
||||
}
|
||||
}
|
||||
@ -1187,9 +1189,10 @@ function needNamespaceDefine(node, isHTML, visibleNamespaces) {
|
||||
* are serialized as their entity references, so they will be preserved.
|
||||
* (In contrast to whitespace literals in the input which are normalized to spaces)
|
||||
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
||||
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
||||
*/
|
||||
function addSerializedAttribute(buf, qualifiedName, value) {
|
||||
buf.push(' ', qualifiedName, '="', value.replace(/[<&"\t\n\r]/g, _xmlEncoder), '"')
|
||||
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"')
|
||||
}
|
||||
|
||||
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
||||
@ -1334,10 +1337,10 @@ function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
||||
* and does not include the CDATA-section-close delimiter, `]]>`.
|
||||
*
|
||||
* @see https://www.w3.org/TR/xml/#NT-CharData
|
||||
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
||||
*/
|
||||
return buf.push(node.data
|
||||
.replace(/[<&]/g,_xmlEncoder)
|
||||
.replace(/]]>/g, ']]>')
|
||||
.replace(/[<&>]/g,_xmlEncoder)
|
||||
);
|
||||
case CDATA_SECTION_NODE:
|
||||
return buf.push( '<![CDATA[',node.data,']]>');
|
||||
@ -1423,11 +1426,13 @@ function importNode(doc,node,deep){
|
||||
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
||||
function cloneNode(doc,node,deep){
|
||||
var node2 = new node.constructor();
|
||||
for(var n in node){
|
||||
var v = node[n];
|
||||
if(typeof v != 'object' ){
|
||||
if(v != node2[n]){
|
||||
node2[n] = v;
|
||||
for (var n in node) {
|
||||
if (Object.prototype.hasOwnProperty.call(node, n)) {
|
||||
var v = node[n];
|
||||
if (typeof v != "object") {
|
||||
if (v != node2[n]) {
|
||||
node2[n] = v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
22
node_modules/@xmldom/xmldom/lib/sax.js
generated
vendored
22
node_modules/@xmldom/xmldom/lib/sax.js
generated
vendored
@ -135,8 +135,10 @@ function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
|
||||
if(endIgnoreCaseMach){
|
||||
domBuilder.endElement(config.uri,config.localName,tagName);
|
||||
if(localNSMap){
|
||||
for(var prefix in localNSMap){
|
||||
domBuilder.endPrefixMapping(prefix) ;
|
||||
for (var prefix in localNSMap) {
|
||||
if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {
|
||||
domBuilder.endPrefixMapping(prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!endMatch){
|
||||
@ -478,8 +480,10 @@ function appendElement(el,domBuilder,currentNSMap){
|
||||
if(el.closed){
|
||||
domBuilder.endElement(ns,localName,tagName);
|
||||
if(localNSMap){
|
||||
for(prefix in localNSMap){
|
||||
domBuilder.endPrefixMapping(prefix)
|
||||
for (prefix in localNSMap) {
|
||||
if (Object.prototype.hasOwnProperty.call(localNSMap, prefix)) {
|
||||
domBuilder.endPrefixMapping(prefix);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
@ -525,9 +529,15 @@ function fixSelfClosed(source,elStartEnd,tagName,closeMap){
|
||||
return pos<elStartEnd;
|
||||
//}
|
||||
}
|
||||
function _copy(source,target){
|
||||
for(var n in source){target[n] = source[n]}
|
||||
|
||||
function _copy (source, target) {
|
||||
for (var n in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, n)) {
|
||||
target[n] = source[n];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
|
||||
var next= source.charAt(start+2)
|
||||
switch(next){
|
||||
|
||||
14
node_modules/@xmldom/xmldom/package.json
generated
vendored
14
node_modules/@xmldom/xmldom/package.json
generated
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@xmldom/xmldom",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.3",
|
||||
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.",
|
||||
"keywords": [
|
||||
"w3c",
|
||||
@ -44,15 +44,15 @@
|
||||
"devDependencies": {
|
||||
"@stryker-mutator/core": "5.6.1",
|
||||
"auto-changelog": "2.4.0",
|
||||
"eslint": "8.9.0",
|
||||
"eslint-config-prettier": "8.3.0",
|
||||
"eslint": "8.25.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-es5": "1.5.0",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"get-stream": "6.0.1",
|
||||
"jest": "27.5.1",
|
||||
"nodemon": "2.0.15",
|
||||
"np": "7.6.0",
|
||||
"prettier": "2.5.1",
|
||||
"nodemon": "2.0.20",
|
||||
"np": "7.6.2",
|
||||
"prettier": "2.7.1",
|
||||
"xmltest": "1.5.0",
|
||||
"yauzl": "2.10.0"
|
||||
},
|
||||
|
||||
341
node_modules/@xmldom/xmldom/readme.md
generated
vendored
341
node_modules/@xmldom/xmldom/readme.md
generated
vendored
@ -41,28 +41,23 @@ This project was forked from it's [original source](https://github.com/jindw/xml
|
||||
|
||||
### Example:
|
||||
|
||||
[In NodeJS](examples/nodejs/src/index.js)
|
||||
```javascript
|
||||
const { DOMParser } = require('@xmldom/xmldom')
|
||||
const { DOMParser, XMLSerializer } = require('@xmldom/xmldom')
|
||||
|
||||
const doc = new DOMParser().parseFromString(
|
||||
'<xml xmlns="a" xmlns:c="./lite">\n' +
|
||||
'\t<child>test</child>\n' +
|
||||
'\t<child></child>\n' +
|
||||
'\t<child/>\n' +
|
||||
'</xml>',
|
||||
'text/xml'
|
||||
)
|
||||
doc.documentElement.setAttribute('x', 'y')
|
||||
doc.documentElement.setAttributeNS('./lite', 'c:x', 'y2')
|
||||
console.info(doc)
|
||||
const source = `<xml xmlns="a">
|
||||
<child>test</child>
|
||||
<child/>
|
||||
</xml>`
|
||||
|
||||
const nsAttr = doc.documentElement.getAttributeNS('./lite', 'x')
|
||||
console.info(nsAttr)
|
||||
const doc = new DOMParser().parseFromString(source, 'text/xml')
|
||||
|
||||
const serialized = new XMLSerializer().serializeToString(doc)
|
||||
```
|
||||
|
||||
Note: in Typescript and ES6 you can use the import approach, as follows:
|
||||
Note: in Typescript ~and ES6~(see #316) you can use the `import` approach, as follows:
|
||||
|
||||
```javascript
|
||||
```typescript
|
||||
import { DOMParser } from '@xmldom/xmldom'
|
||||
```
|
||||
|
||||
@ -103,182 +98,204 @@ import { DOMParser } from '@xmldom/xmldom'
|
||||
```
|
||||
### DOM level2 method and attribute:
|
||||
|
||||
* [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)
|
||||
|
||||
attribute:
|
||||
nodeValue|prefix
|
||||
readonly attribute:
|
||||
nodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName
|
||||
method:
|
||||
insertBefore(newChild, refChild)
|
||||
replaceChild(newChild, oldChild)
|
||||
removeChild(oldChild)
|
||||
appendChild(newChild)
|
||||
hasChildNodes()
|
||||
cloneNode(deep)
|
||||
normalize()
|
||||
isSupported(feature, version)
|
||||
hasAttributes()
|
||||
* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)
|
||||
The DOMException class has the following constants (and `value` of type `Number`):
|
||||
* [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247)
|
||||
|
||||
readonly class properties (aka `NodeType`),
|
||||
these can be accessed from any `Node` instance `node`:
|
||||
`if (node.nodeType === node.ELEMENT_NODE) {...`
|
||||
|
||||
1. `DOMException.INDEX_SIZE_ERR` (`1`)
|
||||
1. `DOMException.DOMSTRING_SIZE_ERR` (`2`)
|
||||
1. `DOMException.HIERARCHY_REQUEST_ERR` (`3`)
|
||||
1. `DOMException.WRONG_DOCUMENT_ERR` (`4`)
|
||||
1. `DOMException.INVALID_CHARACTER_ERR` (`5`)
|
||||
1. `DOMException.NO_DATA_ALLOWED_ERR` (`6`)
|
||||
1. `DOMException.NO_MODIFICATION_ALLOWED_ERR` (`7`)
|
||||
1. `DOMException.NOT_FOUND_ERR` (`8`)
|
||||
1. `DOMException.NOT_SUPPORTED_ERR` (`9`)
|
||||
1. `DOMException.INUSE_ATTRIBUTE_ERR` (`10`)
|
||||
1. `DOMException.INVALID_STATE_ERR` (`11`)
|
||||
1. `DOMException.SYNTAX_ERR` (`12`)
|
||||
1. `DOMException.INVALID_MODIFICATION_ERR` (`13`)
|
||||
1. `DOMException.NAMESPACE_ERR` (`14`)
|
||||
1. `DOMException.INVALID_ACCESS_ERR` (`15`)
|
||||
1. `ELEMENT_NODE` (`1`)
|
||||
2. `ATTRIBUTE_NODE` (`2`)
|
||||
3. `TEXT_NODE` (`3`)
|
||||
4. `CDATA_SECTION_NODE` (`4`)
|
||||
5. `ENTITY_REFERENCE_NODE` (`5`)
|
||||
6. `ENTITY_NODE` (`6`)
|
||||
7. `PROCESSING_INSTRUCTION_NODE` (`7`)
|
||||
8. `COMMENT_NODE` (`8`)
|
||||
9. `DOCUMENT_NODE` (`9`)
|
||||
10. `DOCUMENT_TYPE_NODE` (`10`)
|
||||
11. `DOCUMENT_FRAGMENT_NODE` (`11`)
|
||||
12. `NOTATION_NODE` (`12`)
|
||||
|
||||
attribute:
|
||||
- `nodeValue` | `prefix`
|
||||
|
||||
readonly attribute:
|
||||
- `nodeName` | `nodeType` | `parentNode` | `childNodes` | `firstChild` | `lastChild` | `previousSibling` | `nextSibling` | `attributes` | `ownerDocument` | `namespaceURI` | `localName`
|
||||
|
||||
method:
|
||||
* `insertBefore(newChild, refChild)`
|
||||
* `replaceChild(newChild, oldChild)`
|
||||
* `removeChild(oldChild)`
|
||||
* `appendChild(newChild)`
|
||||
* `hasChildNodes()`
|
||||
* `cloneNode(deep)`
|
||||
* `normalize()`
|
||||
* `isSupported(feature, version)`
|
||||
* `hasAttributes()`
|
||||
* [DOMException](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html)
|
||||
|
||||
extends the Error type thrown as part of DOM API.
|
||||
|
||||
readonly class properties:
|
||||
- `INDEX_SIZE_ERR` (`1`)
|
||||
- `DOMSTRING_SIZE_ERR` (`2`)
|
||||
- `HIERARCHY_REQUEST_ERR` (`3`)
|
||||
- `WRONG_DOCUMENT_ERR` (`4`)
|
||||
- `INVALID_CHARACTER_ERR` (`5`)
|
||||
- `NO_DATA_ALLOWED_ERR` (`6`)
|
||||
- `NO_MODIFICATION_ALLOWED_ERR` (`7`)
|
||||
- `NOT_FOUND_ERR` (`8`)
|
||||
- `NOT_SUPPORTED_ERR` (`9`)
|
||||
- `INUSE_ATTRIBUTE_ERR` (`10`)
|
||||
- `INVALID_STATE_ERR` (`11`)
|
||||
- `SYNTAX_ERR` (`12`)
|
||||
- `INVALID_MODIFICATION_ERR` (`13`)
|
||||
- `NAMESPACE_ERR` (`14`)
|
||||
- `INVALID_ACCESS_ERR` (`15`)
|
||||
|
||||
The DOMException object has the following properties:
|
||||
code
|
||||
This property is of type Number.
|
||||
attributes:
|
||||
- `code` with a value matching one of the above constants.
|
||||
|
||||
* extends the Error type thrown as part of DOM API:
|
||||
* [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)
|
||||
|
||||
* [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490)
|
||||
method:
|
||||
- `hasFeature(feature, version)`
|
||||
- `createDocumentType(qualifiedName, publicId, systemId)`
|
||||
- `createDocument(namespaceURI, qualifiedName, doctype)`
|
||||
|
||||
* [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node
|
||||
|
||||
method:
|
||||
hasFeature(feature, version)
|
||||
createDocumentType(qualifiedName, publicId, systemId)
|
||||
createDocument(namespaceURI, qualifiedName, doctype)
|
||||
readonly attribute:
|
||||
- `doctype` | `implementation` | `documentElement`
|
||||
|
||||
method:
|
||||
- `createElement(tagName)`
|
||||
- `createDocumentFragment()`
|
||||
- `createTextNode(data)`
|
||||
- `createComment(data)`
|
||||
- `createCDATASection(data)`
|
||||
- `createProcessingInstruction(target, data)`
|
||||
- `createAttribute(name)`
|
||||
- `createEntityReference(name)`
|
||||
- `getElementsByTagName(tagname)`
|
||||
- `importNode(importedNode, deep)`
|
||||
- `createElementNS(namespaceURI, qualifiedName)`
|
||||
- `createAttributeNS(namespaceURI, qualifiedName)`
|
||||
- `getElementsByTagNameNS(namespaceURI, localName)`
|
||||
- `getElementById(elementId)`
|
||||
|
||||
* [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node
|
||||
* [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node
|
||||
* [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node
|
||||
|
||||
readonly attribute:
|
||||
doctype|implementation|documentElement
|
||||
method:
|
||||
createElement(tagName)
|
||||
createDocumentFragment()
|
||||
createTextNode(data)
|
||||
createComment(data)
|
||||
createCDATASection(data)
|
||||
createProcessingInstruction(target, data)
|
||||
createAttribute(name)
|
||||
createEntityReference(name)
|
||||
getElementsByTagName(tagname)
|
||||
importNode(importedNode, deep)
|
||||
createElementNS(namespaceURI, qualifiedName)
|
||||
createAttributeNS(namespaceURI, qualifiedName)
|
||||
getElementsByTagNameNS(namespaceURI, localName)
|
||||
getElementById(elementId)
|
||||
readonly attribute:
|
||||
- `tagName`
|
||||
|
||||
* [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node
|
||||
* [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node
|
||||
method:
|
||||
- `getAttribute(name)`
|
||||
- `setAttribute(name, value)`
|
||||
- `removeAttribute(name)`
|
||||
- `getAttributeNode(name)`
|
||||
- `setAttributeNode(newAttr)`
|
||||
- `removeAttributeNode(oldAttr)`
|
||||
- `getElementsByTagName(name)`
|
||||
- `getAttributeNS(namespaceURI, localName)`
|
||||
- `setAttributeNS(namespaceURI, qualifiedName, value)`
|
||||
- `removeAttributeNS(namespaceURI, localName)`
|
||||
- `getAttributeNodeNS(namespaceURI, localName)`
|
||||
- `setAttributeNodeNS(newAttr)`
|
||||
- `getElementsByTagNameNS(namespaceURI, localName)`
|
||||
- `hasAttribute(name)`
|
||||
- `hasAttributeNS(namespaceURI, localName)`
|
||||
|
||||
* [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node
|
||||
|
||||
attribute:
|
||||
- `value`
|
||||
|
||||
readonly attribute:
|
||||
- `name` | `specified` | `ownerElement`
|
||||
|
||||
* [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)
|
||||
|
||||
readonly attribute:
|
||||
tagName
|
||||
method:
|
||||
getAttribute(name)
|
||||
setAttribute(name, value)
|
||||
removeAttribute(name)
|
||||
getAttributeNode(name)
|
||||
setAttributeNode(newAttr)
|
||||
removeAttributeNode(oldAttr)
|
||||
getElementsByTagName(name)
|
||||
getAttributeNS(namespaceURI, localName)
|
||||
setAttributeNS(namespaceURI, qualifiedName, value)
|
||||
removeAttributeNS(namespaceURI, localName)
|
||||
getAttributeNodeNS(namespaceURI, localName)
|
||||
setAttributeNodeNS(newAttr)
|
||||
getElementsByTagNameNS(namespaceURI, localName)
|
||||
hasAttribute(name)
|
||||
hasAttributeNS(namespaceURI, localName)
|
||||
|
||||
* [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node
|
||||
readonly attribute:
|
||||
- `length`
|
||||
|
||||
method:
|
||||
- `item(index)`
|
||||
|
||||
attribute:
|
||||
value
|
||||
readonly attribute:
|
||||
name|specified|ownerElement
|
||||
* [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)
|
||||
|
||||
* [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177)
|
||||
readonly attribute:
|
||||
- `length`
|
||||
|
||||
method:
|
||||
- `getNamedItem(name)`
|
||||
- `setNamedItem(arg)`
|
||||
- `removeNamedItem(name)`
|
||||
- `item(index)`
|
||||
- `getNamedItemNS(namespaceURI, localName)`
|
||||
- `setNamedItemNS(arg)`
|
||||
- `removeNamedItemNS(namespaceURI, localName)`
|
||||
|
||||
readonly attribute:
|
||||
length
|
||||
method:
|
||||
item(index)
|
||||
* [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node
|
||||
|
||||
* [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922)
|
||||
|
||||
readonly attribute:
|
||||
length
|
||||
method:
|
||||
getNamedItem(name)
|
||||
setNamedItem(arg)
|
||||
removeNamedItem(name)
|
||||
item(index)
|
||||
getNamedItemNS(namespaceURI, localName)
|
||||
setNamedItemNS(arg)
|
||||
removeNamedItemNS(namespaceURI, localName)
|
||||
method:
|
||||
- `substringData(offset, count)`
|
||||
- `appendData(arg)`
|
||||
- `insertData(offset, arg)`
|
||||
- `deleteData(offset, count)`
|
||||
- `replaceData(offset, count, arg)`
|
||||
|
||||
* [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node
|
||||
|
||||
method:
|
||||
substringData(offset, count)
|
||||
appendData(arg)
|
||||
insertData(offset, arg)
|
||||
deleteData(offset, count)
|
||||
replaceData(offset, count, arg)
|
||||
|
||||
* [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData
|
||||
|
||||
method:
|
||||
splitText(offset)
|
||||
* [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData
|
||||
|
||||
method:
|
||||
- `splitText(offset)`
|
||||
|
||||
* [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)
|
||||
* [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData
|
||||
* [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212)
|
||||
* [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData
|
||||
|
||||
* [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)
|
||||
* [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927)
|
||||
|
||||
readonly attribute:
|
||||
name|entities|notations|publicId|systemId|internalSubset
|
||||
readonly attribute:
|
||||
- `name` | `entities` | `notations` | `publicId` | `systemId` | `internalSubset`
|
||||
|
||||
* Notation : Node
|
||||
* Notation : Node
|
||||
|
||||
readonly attribute:
|
||||
publicId|systemId
|
||||
readonly attribute:
|
||||
- `publicId` | `systemId`
|
||||
|
||||
* Entity : Node
|
||||
* Entity : Node
|
||||
|
||||
readonly attribute:
|
||||
publicId|systemId|notationName
|
||||
readonly attribute:
|
||||
- `publicId` | `systemId` | `notationName`
|
||||
|
||||
* EntityReference : Node
|
||||
* ProcessingInstruction : Node
|
||||
|
||||
attribute:
|
||||
data
|
||||
readonly attribute:
|
||||
target
|
||||
* EntityReference : Node
|
||||
* ProcessingInstruction : Node
|
||||
|
||||
attribute:
|
||||
- `data`
|
||||
readonly attribute:
|
||||
- `target`
|
||||
|
||||
### DOM level 3 support:
|
||||
|
||||
* [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)
|
||||
* [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent)
|
||||
|
||||
attribute:
|
||||
textContent
|
||||
method:
|
||||
isDefaultNamespace(namespaceURI){
|
||||
lookupNamespaceURI(prefix)
|
||||
attribute:
|
||||
- `textContent`
|
||||
|
||||
method:
|
||||
- `isDefaultNamespace(namespaceURI)`
|
||||
- `lookupNamespaceURI(prefix)`
|
||||
|
||||
### DOM extension by xmldom
|
||||
|
||||
* [Node] Source position extension;
|
||||
|
||||
attribute:
|
||||
//Numbered starting from '1'
|
||||
lineNumber
|
||||
//Numbered starting from '1'
|
||||
columnNumber
|
||||
attribute:
|
||||
- `lineNumber` //number starting from `1`
|
||||
- `columnNumber` //number starting from `1`
|
||||
|
||||
## Specs
|
||||
|
||||
@ -336,4 +353,4 @@ xmldom has an own SAX parser implementation to do the actual parsing, which impl
|
||||
- `XMLReader`
|
||||
- `DOMHandler`
|
||||
|
||||
There is an idea/proposal to make ti possible to replace it with something else in <https://github.com/xmldom/xmldom/issues/55>
|
||||
There is an idea/proposal to make it possible to replace it with something else in <https://github.com/xmldom/xmldom/issues/55>
|
||||
|
||||
Reference in New Issue
Block a user