Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

XMLCData.js 1010B

1234567891011121314151617181920212223242526272829303132
  1. // Generated by CoffeeScript 1.12.7
  2. (function() {
  3. var XMLCData, XMLNode,
  4. extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
  5. hasProp = {}.hasOwnProperty;
  6. XMLNode = require('./XMLNode');
  7. module.exports = XMLCData = (function(superClass) {
  8. extend(XMLCData, superClass);
  9. function XMLCData(parent, text) {
  10. XMLCData.__super__.constructor.call(this, parent);
  11. if (text == null) {
  12. throw new Error("Missing CDATA text");
  13. }
  14. this.text = this.stringify.cdata(text);
  15. }
  16. XMLCData.prototype.clone = function() {
  17. return Object.create(this);
  18. };
  19. XMLCData.prototype.toString = function(options) {
  20. return this.options.writer.set(options).cdata(this);
  21. };
  22. return XMLCData;
  23. })(XMLNode);
  24. }).call(this);