Method naming seems pretty confusing. We have toDOM
and fromDOM
, but parseHTML
and toHTML
/innerHTML
(which return the same thing even though the naming would suggest that the latter drops the top node; also toHTML
hardly warns you that the DOM object is going to be corrupted), parseWikitextToDOM
/ parseExtTagToDOM
and serializeHTML
/ serializeChildren
(which are supposed to be the mirror image of each other but follow different naming schemes)...
IMO it would be a lot nicer if you just stanadardized on somethingToSomething - ExtensionTag::domToWikitext
, ExtensionTag::wikitextToDom
, ParsoidExtensionAPI::htmlToDom
, ParsoidExtensionAPI::domToHtml
, ParsoidExtensionAPI::domToHtmlInPlace
(or something similar that makes it very clear that this changes the DOM), ParsoidExtensionAPI::wikitextToDom
, ParsoidExtensionAPI::extensionTagToDom
, ParsoidExtensionAPI::domToWikitext
, ParsoidExtensionAPI::domToExtensionTag
...