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

updated dependencies #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = Handler;
function Handler(dom) {
this.dom = dom;
this.document = null;
this._quirksMode = false;
this._quirksMode = "no-quirks";
this._reset = false;
}

Expand Down Expand Up @@ -82,14 +82,14 @@ Handler.prototype = {

},

setQuirksMode: function (document) {
setDocumentMode: function (document, mode) {
if (document !== this.document) {
throw new Error("Given document does not match handler document");
}
this._quirksMode = true;
this._quirksMode = mode;
},

isQuirksMode: function (document) {
getDocumentMode: function (document) {
if (document !== this.document) {
throw new Error("Given document does not match handler document");
}
Expand Down
5 changes: 2 additions & 3 deletions minidom.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Parser = require("parse5").Parser;
var parse5 = require("parse5");
var Handler = require("./handler");
var dom = require("./dom");

Expand All @@ -8,9 +8,8 @@ module.exports = function minidom(html) {
}

var handler = new Handler(dom);
var parser = new Parser(handler);

parser.parse(html);
parse5.parse(html, {treeAdapter: handler});

return handler.document;
};
Loading