In order to pass HTML as a parsed DOM tree from Parsoid to core while allowing compatibility with legacy users in core which expect an HTML string, we should create a ContentHolder interface. A ContentHolder holds either a parsed DOM or HTML string and tries to avoid unnecessary serialization and reparsing when different clients of ContentHolder are chained together.
Further discussion in https://www.mediawiki.org/wiki/Parsoid/OutputTransform/ContentHolder