Page MenuHomePhabricator

Complete porting of Dodo (PHP port of Domino node.js DOM library)
Open, MediumPublic

Description

@jlinehan started working on T217867: Port domino (or another spec-compliant DOM library) to PHP and has a first cut version ready.

This is a tracker task to outline the tasks to complete that port and integration. Subtasks will cover those different pieces.

The porting will be bounded by the following constraints (similar to domino.js)

  • We will only target the latest DOM spec (DOM4), not any of the deprecated legacy methods.
  • We will not support dynamic script loading, and document.write functionality. The library will be "secure" -- setting the src element on an <img> tag won't trigger network traffic and resource loading, etc.
  • We will not support all events (see above re onload etc). We *may* support *some* events, eg document mutation events, which are relevant.
  • Given the limited functionality we are targeting as above, full W3C spec test suite compliance not a goal. But, Domino test suite compliance is a goal. Subtasks will specify the exact test suites and degree of test compliance expected.

Ideally the set of methods implemented will be a (bug-fixed) superset of PHP's libxml binding, to facilitate migration (T271728). But PHP's binding includes some deprecated methods (getAttributeNode etc) which we needn't port over.

In the end, for use within the Wikimedia Foundation, this DOM library's use will be bounded by how libxml + PHP-DOM are used. So, as a rule of thumb, when making prioritization choices about what to implement and what to leave out, leave out anything that is not essential for the first-cut replacement of libxml + PHP-DOM combo.

Milestones & priority

The following are the top level milestones, in priority order

  1. T269259: Build test infrastructure to run spec tests against DODO (highest priority)
  2. T269262/T269707: Remex/Zest integration
  3. T269270: Dynamic generation of HTML *Element classes
  4. T269459: Performance testing and tuning
  5. T271730: Bug squashing (lowest priority)

Event Timeline

ssastry triaged this task as Medium priority.Dec 2 2020, 5:58 PM
cscott updated the task description. (Show Details)
ssastry renamed this task from Complete porting of Domino (JS) library to PHP to Complete porting of Dodo (Domino node.js DOM library) to PHP.Jan 11 2021, 7:10 PM
ssastry renamed this task from Complete porting of Dodo (Domino node.js DOM library) to PHP to Complete porting of Dodo (PHP port of Domino node.js DOM library).Jan 11 2021, 8:07 PM