azaslavsky / domJSON

Convert DOM trees into compact JSON objects, and vice versa, as fast as possible.
http://azaslavsky.github.io/domJSON/
Other
126 stars 43 forks source link

Add "opts.tagNames" and "opts.nodeTypes" for ".toJSON" method #9

Open azaslavsky opened 9 years ago

azaslavsky commented 9 years ago

opts.nodeTypes should replace opts.htmlOnly, which is too narrow of a spec. opts.tagNames should be FilterList type field to specify which HTML tags to include/exclude, and should default to true.