This is a potentially API-breaking change, but we should probably deprecate the <head> section of the document produced by Parsoid, and instead render this on the mediawiki-core side, based on the metadata in the ParserOutput. This would allow us to (a) implement a more-or-less complete mapping of ParserOutput information into <head> metadata, for those who need that (and there are external API users who do want an all-in-one document), and (b) remove the need to store different ParserOutput content for legacy (which is just <body> innerHTML) and Parsoid (which is currently an entire <html> document).
Description
Description