JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
change parser api again
[peach-html5-editor.git] / parser.js
index e29b3bd..1bbc57b 100644 (file)
--- a/parser.js
+++ b/parser.js
@@ -6070,12 +6070,15 @@ parse_html = function (args_html, args) {
        return doc.children
 }
 
+var this_module = {
+       parse: parse_html,
+       Node: Node,
+}
+
 if (context === 'module') {
-       module.exports = parse_html
+       module.exports = this_module
 } else {
-       window.peach_parser = parse_html
+       window.peach_parser = this_module
 }
 
-parse_html.Node = Node
-
 }).call(this)