Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various maintenance - 0.3.0-dev #28

Merged
merged 18 commits into from Mar 4, 2020
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

91 changes: 91 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,91 @@
## 0.3.0

- Node >=10.x now required.
- Added getElementsByClassName method.
- Added Node to the list of exports
- Added lowercase of åäö in entityMap.
- More package.json refactoring.
- Removed .npmignore in favor of `files` entry in package.json.
kethinov marked this conversation as resolved.
Show resolved Hide resolved
- Replaced CHANGELOG with more rigorous file.
- Replaced LICENSE with more rigorous file.
- Removed component.json (deprecated package manager https://github.com/componentjs/guide)
- `proof` devDep updated to latest.
- Fixed CI.
- README updates.

## 0.2.1

- More package.json refactoring.

## 0.2.0

- Now publishing under xmldom npm package again; retiring xmldom-alpha.
- Remove coveralls.
- Disable cache in travis.
- Other refactoring.

## 0.1.28 (via xmldom-alpha npm package)

- Removed __proto__ accessor.
- Appended HTML entities defaults.

## 0.1.27 (via xmldom-alpha npm package)

- Various bug fixes.
- Don't ask why 0.1.26 and 0.1.25 were skipped. `¯\_(ツ)_/¯`

## 0.1.24 (via xmldom-alpha package)

- Added node filter.

## 0.1.23 (via xmldom-alpha npm package)

- Added namespace support for nest node serialize.
- Various other bug fixes.

## 0.1.22

- Merge XMLNS serialization.
- Removed \r from source string.
- Print namespaces for child elements.
- Switch references to nodeType to use named constants.
- Add nodelist toString support.

## 0.1.21

- Fixed serialize bug.

## 0.1.20

- Optimized invalid XML support.
- Added toString sorter for attributes output.
- Added html self closed node button.
- Added `*` NS support for getElementsByTagNameNS.
- Converted attribute's value to string in setAttributeNS.
- Added support for HTML entities for HTML docs only.
- Fixed TypeError when Document is created with DocumentType.

## 0.1.19

- Fixed issue #68, infinite loop on unclosed comment.
- Added error report for unclosed tag.
- Various other fixes.

## 0.1.18

- Added default `ns` support.
- parseFromString now renders entirely plain text documents as textNode.
- Enabled option to ignore white space on parsing.

## 0.1.16

- Correctly handle multibyte Unicode greater than two byts. #57. #56.
- Initial unit testing and test coverage. #53. #46. #19.
- Create Bower `component.json` #52.

## 0.1.8

- Add: some test case from node-o3-xml(excludes xpath support)
- Fix: remove existed attribute before setting (bug introduced in v0.1.5)
- Fix: index direct access for childNodes and any NodeList collection(not w3c standard)
- Fix: remove last child bug
8 changes: 0 additions & 8 deletions LICENSE

This file was deleted.

4 changes: 4 additions & 0 deletions LICENSE.md
@@ -0,0 +1,4 @@
You can choose any one of these licenses:

- MIT: https://opensource.org/licenses/MIT
- LGPL: http://www.gnu.org/licenses/lgpl.html
2 changes: 1 addition & 1 deletion __package__.js
@@ -1,4 +1,4 @@
this.addScript('dom.js',['DOMImplementation','XMLSerializer']);
this.addScript('dom-parser.js',['DOMHandler','DOMParser'],
['DOMImplementation','XMLReader']);
this.addScript('sax.js','XMLReader');
this.addScript('sax.js','XMLReader');
14 changes: 0 additions & 14 deletions changelog

This file was deleted.

10 changes: 0 additions & 10 deletions component.json

This file was deleted.

16 changes: 8 additions & 8 deletions dom-parser.js → lib/dom-parser.js
@@ -1,6 +1,6 @@
function DOMParser(options){
this.options = options ||{locator:{}};

kethinov marked this conversation as resolved.
Show resolved Hide resolved
}

DOMParser.prototype.parseFromString = function(source,mimeType){
Expand All @@ -15,7 +15,7 @@ DOMParser.prototype.parseFromString = function(source,mimeType){
if(locator){
domBuilder.setDocumentLocator(locator)
}

sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
sax.domBuilder = options.domBuilder || domBuilder;
if(isHTML){
Expand Down Expand Up @@ -58,8 +58,8 @@ function buildErrorHandler(errorImpl,domBuilder,locator){
/**
* +ContentHandler+ErrorHandler
* +LexicalHandler+EntityResolver2
* -DeclHandler-DTDHandler
*
* -DeclHandler-DTDHandler
*
* DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler
* DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2
* @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html
Expand All @@ -74,7 +74,7 @@ function position(locator,node){
/**
* @see org.xml.sax.ContentHandler#startDocument
* @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html
*/
*/
DOMHandler.prototype = {
startDocument : function() {
this.doc = new DOMImplementation().createDocument(null, null, null);
Expand All @@ -88,7 +88,7 @@ DOMHandler.prototype = {
var len = attrs.length;
appendElement(this, el);
this.currentElement = el;

this.locator && position(this.locator,el)
kethinov marked this conversation as resolved.
Show resolved Hide resolved
for (var i = 0 ; i < len; i++) {
var namespaceURI = attrs.getURI(i);
Expand Down Expand Up @@ -151,15 +151,15 @@ DOMHandler.prototype = {
this.locator && position(this.locator,comm)
appendElement(this, comm);
},

startCDATA:function() {
//used in characters() methods
this.cdata = true;
},
endCDATA:function() {
this.cdata = false;
},

startDTD:function(name, publicId, systemId) {
var impl = this.doc.implementation;
if (impl && impl.createDocumentType) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.