{"_id":"@bmewburn/minidom","_rev":"1-dec206502ad28141a424cbf0a1fd4b23","name":"@bmewburn/minidom","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@bmewburn/minidom","version":"1.0.1","description":"Small DOM level 1 implementation","homepage":"https://github.com/montagejs/minidom","repository":{"type":"git","url":"git+https://github.com/montagejs/minidom.git"},"main":"minidom.js","scripts":{"test":"istanbul test -x '**/spec/**' jasminum -- spec"},"keywords":["dom","html"],"author":{"name":"Stuart Knightley","email":"stuart@stuartk.com"},"license":"MIT","dependencies":{"parse5":"^5.1.0"},"devDependencies":{"istanbul":"^0.4.5","jasminum":"^0.0.6"},"private":false,"gitHead":"43954850baceaeafa6c598dee2e37e22fdafaea9","bugs":{"url":"https://github.com/montagejs/minidom/issues"},"_id":"@bmewburn/minidom@1.0.1","_nodeVersion":"10.15.3","_npmVersion":"6.9.0","dist":{"integrity":"sha512-T8sxd/2JQWdzQbeLMhTQ1nGj/oUl2h2EEqHeGy3a3LMY9L9J9NuXYco7xiu17hHuo7joPPzCnPg+2xLtQ/tg2g==","shasum":"5a2563cf677b4954d720190e2bdb2b766d37a9d5","tarball":"https://registry.npmjs.org/@bmewburn/minidom/-/minidom-1.0.1.tgz","fileCount":13,"unpackedSize":105259,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJclqxRCRA9TVsSAnZWagAAAGQP/RhWs8MyMC8KwRECJz11\nHtoZBBIT6Hi/ssZ0vxGThq+tOmhINfPpkypn1YxCQPuZu2vwj9ntUYlPdEkK\n6N8RaUzNxEItblgLFcI6Lv7Oa3GAS4BPR4SH5WR6mFn07F/ew2qfNC70/ruV\n4YGCrz5wMFWzyTOPOnp5CWJCD+dDQEmWXtKqTFWpu16KamjPVclW+a/U9qps\nZYe8KjdCBt1N68/Yj6UFkpxWwDZsLBVeSPAHYxyVikGUJrmpZWL2TA52xCQJ\nfxJDVEW0ifSHKwt4g97U+LigBMOFPwSsuKp1my2KeYpjP3nQBtLKDuiT2CkX\nA3itog+AN/pFj2RRd9XacjfTn3lZ/8LRdPAKschgUiszNtgAUY+RI1+Ki9T0\nOytmIGUOFJhOqVFoonI45moCudS7Ool9911CmemP9FXOSNedy0EypMRN3Ow9\n4yTNcPOERnNDhB8g7RZtvfq+Qf9t1FiaVoGxDemnhlE6ZfWEaYe6lmxW9D4D\nSD+GW8RRwSmi/dBwHW5OrRQdyA8sToy+CMCB7PRxmlbkt7GjArP3zRIsPMj4\nQtu9VawPCmqoIp4zSN4SqoLFMWbSkc0vXqaLItLiEKrRXrpmWI/WovwZcqPL\nes+LGnearK+mYulaxXWOPnxqggrzarUowxqoc8INPpDlUOPeD/wJiVve6y8u\nEKRA\r\n=U3gt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID1iDFpQCgIpAZtuOQV+8m3+J3TD1jsWSVyGXP2oZ+2lAiAXkWvu2+JsNIk99XdlKjqY4o/R4EAHvs3t5hz/pfuS+w=="}]},"maintainers":[{"name":"bmewburn","email":"ben@mewburn.id.au"}],"_npmUser":{"name":"bmewburn","email":"ben@mewburn.id.au"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minidom_1.0.1_1553378384818_0.11472151828761734"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-23T21:59:44.619Z","1.0.1":"2019-03-23T21:59:44.950Z","modified":"2022-04-04T19:52:06.618Z"},"maintainers":[{"name":"bmewburn","email":"ben@mewburn.id.au"}],"description":"Small DOM level 1 implementation","homepage":"https://github.com/montagejs/minidom","keywords":["dom","html"],"repository":{"type":"git","url":"git+https://github.com/montagejs/minidom.git"},"author":{"name":"Stuart Knightley","email":"stuart@stuartk.com"},"bugs":{"url":"https://github.com/montagejs/minidom/issues"},"license":"MIT","readme":"minidom\n=======\n\nA small JavaScript DOM. Implements DOM level 1, with `textContent` from level 3\nand `innerHTML` and `outerHTML` getters. Only supports HTML documents.\n\n## Usage\n\n```javascript\nvar minidom = require(\"minidom\");\n\nvar document = minidom('<!doctype><html><head><title>Hello</title><body><h1>Hi!</h1></body></html>');\n\nexpect(document.getElementsByTagName(\"h1\")[0].textContent).toEqual(\"Hi!\");\n```\n\nYou can also access the DOM implementation used internally:\n\n```javascript\nvar dom = require(\"minidom/dom\");\n\nvar document = minidom();\nexpect(document instanceof dom.Node).toBeTruthy();\n```\n\n## Differences with JSDom\n\n|  | JSDom | minidom |\n| --- | --- | --- |\n| Runs Javascript in the page context | Yes | No |\n| CSSOM | Yes | No |\n| Loads remote resources | Yes | No |\n| HTML5 parsing algorithm | No | Yes* |\n| Runs in the browser | No | Yes** |\n| Awesome | Yes | Yes |\n\nBasically minidom does a lot less, but often it's all you need.\n\n<sub>* This means that the DOM representation is the same as you would get in the browser, but may not be suitable if you wish to preserve as much of the original formatting as possible. For example parsing `<body>hi</body><head><title>hello</title>` with minidom results in a document that looks like `<html><head></head><body>hi<title>hello</title></body></html> `, where as JSDom outputs `<html><body>hi</body><head><title>hello</title></head></html>`.</sub>\n\n<sub>** This is probably very cool, although I have no idea why.</sub>\n\n## Supported API\n\nProperties marked &#x20E0;&nbsp; are read-only\n\n### Node\n\n - `ELEMENT_NODE`\n - `ATTRIBUTE_NODE`\n - `TEXT_NODE`\n - `CDATA_SECTION_NODE`\n - `ENTITY_REFERENCE_NODE`\n - `ENTITY_NODE`\n - `PROCESSING_INSTRUCTION_NODE`\n - `COMMENT_NODE`\n - `DOCUMENT_NODE`\n - `DOCUMENT_TYPE_NODE`\n - `DOCUMENT_FRAGMENT_NODE`\n - `NOTATION_NODE`\n - `children` &#x20E0;\n - `nodeValue`\n - `parentNode` &#x20E0;\n - `nodeName` &#x20E0;\n - `attributes` &#x20E0;\n - `firstChild` &#x20E0;\n - `ownerDocument` &#x20E0;\n - `readonly` &#x20E0;\n - `lastChild` &#x20E0;\n - `childNodes` &#x20E0;\n - `nextSibling` &#x20E0;\n - `previousSibling` &#x20E0;\n - `insertBefore(/* Node */ newChild, /* Node*/ refChild)`\n - `replaceChild(/* Node */ newChild, /* Node */ oldChild)`\n - `removeChild(/* Node */ oldChild)`\n - `appendChild(/* Node */ newChild)`\n - `hasChildNodes()`\n - `cloneNode(/* bool */ deep, fn)`\n - `normalize()`\n - `toString()`\n - `raise(type, message, data)`\n - `textContent`\n\n### Document (inherits from Node)\n\n - `nodeType`\n - `contentType` &#x20E0;\n - `doctype`\n - `documentElement` &#x20E0;\n - `implementation`\n - `nodeName` &#x20E0;\n - `tagName` &#x20E0;\n - `nodeValue`\n - `attributes` &#x20E0;\n - `ownerDocument` &#x20E0;\n - `readonly` &#x20E0;\n - `createElement(/* string */ tagName)`\n - `createDocumentFragment()`\n - `createTextNode(/* string */ data)`\n - `createComment(/* string */ data)`\n - `createCDATASection(/* string */ data)`\n - `createProcessingInstruction(/* string */ target, /* string */ data)`\n - `createAttribute(/* string */ name)`\n - `createEntityReference(/* string */ name)`\n - `createEntityNode(/* string */ name)`\n - `createNotationNode(/* string */ name, /* string */ publicId, /* string */ systemId)`\n - `appendChild(/* Node */ arg)`\n - `removeChild(/* Node */ arg)`\n - `getElementsByTagName(/* string */ name)`\n - `outerHTML` &#x20E0;\n\n### Element (inherits from Node)\n\n - `nodeValue`\n - `tagName` &#x20E0;\n - `nodeType`\n - `attributes` &#x20E0;\n - `getAttribute(/* string */ name)`\n - `setAttribute(/* string */ name, /* string */ value)`\n - `removeAttribute(/* string */ name)`\n - `getAttributeNode(/* string */ name)`\n - `setAttributeNode(/* Attr */ newAttr)`\n - `removeAttributeNode(/* Attr */ oldAttr)`\n - `getElementsByTagName(/* string */ name)`\n - `outerHTML` &#x20E0;\n - `innerHTML` &#x20E0;\n\n## Thanks\n\nMade possible with large excerpts from [JSDom](https://github.com/tmpvar/jsdom), and the excellent [parse5](https://github.com/inikulin/parse5) implementation of the HTML5 parsing algorithm.\n\n## License\n\nMIT license. See LICENSE.md for details.\n","readmeFilename":"README.md"}