Page MenuHomePhabricator

Create HtmlHolder interface
Open, HighPublic


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 an HtmlHolder interface. An HtmlHolder holds either a parsed DOM or HTML string and tries to avoid unnecessary serialization and reparsing when different clients of HtmlHolder are chained together.

Further discussion in

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Adding T346829 is a subtask since the HtmlHolder interface needs to be able to serialize/deserialize itself in order to be stored in ParserCache. Technically we could probably get away without this using explicit serialization/deserialization code in ParserOutput, but (as described in the HtmlHolder proposal) ideally we would like to be able to customize the on-disk representation for fast access and use independent from the details of the HTML string/DOM model formats defined by the HtmlHolder abstraction.

MSantos triaged this task as High priority.Oct 5 2023, 2:27 PM