diff options
author | RaindropsSys <raindrops@equestria.dev> | 2024-05-12 17:18:54 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2024-05-12 17:18:54 +0200 |
commit | fcdb5ca193406ef02dba8db4d7684d8c74089552 (patch) | |
tree | 223edcc76b54d18575d2c3bcd87ed321f8a896d6 /generator/node_modules/xmlbuilder/lib/XMLCharacterData.js | |
parent | d9337f848b94f33aa8641acced33c6c2e5efc26e (diff) | |
download | atomic-fcdb5ca193406ef02dba8db4d7684d8c74089552.tar.gz atomic-fcdb5ca193406ef02dba8db4d7684d8c74089552.tar.bz2 atomic-fcdb5ca193406ef02dba8db4d7684d8c74089552.zip |
Updated 9 files and added 103 files (automated)
Diffstat (limited to 'generator/node_modules/xmlbuilder/lib/XMLCharacterData.js')
-rw-r--r-- | generator/node_modules/xmlbuilder/lib/XMLCharacterData.js | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js b/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js new file mode 100644 index 0000000..13b9c00 --- /dev/null +++ b/generator/node_modules/xmlbuilder/lib/XMLCharacterData.js @@ -0,0 +1,86 @@ +// Generated by CoffeeScript 2.4.1 +(function() { + var XMLCharacterData, XMLNode; + + XMLNode = require('./XMLNode'); + + // Represents a character data node + module.exports = XMLCharacterData = (function() { + class XMLCharacterData extends XMLNode { + // Initializes a new instance of `XMLCharacterData` + + constructor(parent) { + super(parent); + this.value = ''; + } + + + // Creates and returns a deep clone of `this` + clone() { + return Object.create(this); + } + + // DOM level 1 functions to be implemented later + substringData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + appendData(arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + insertData(offset, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + deleteData(offset, count) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + replaceData(offset, count, arg) { + throw new Error("This DOM method is not implemented." + this.debugInfo()); + } + + isEqualNode(node) { + if (!super.isEqualNode(node)) { + return false; + } + if (node.data !== this.data) { + return false; + } + return true; + } + + }; + + // DOM level 1 + Object.defineProperty(XMLCharacterData.prototype, 'data', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + Object.defineProperty(XMLCharacterData.prototype, 'length', { + get: function() { + return this.value.length; + } + }); + + // DOM level 3 + Object.defineProperty(XMLCharacterData.prototype, 'textContent', { + get: function() { + return this.value; + }, + set: function(value) { + return this.value = value || ''; + } + }); + + return XMLCharacterData; + + }).call(this); + +}).call(this); |