Dom\HTMLDocument: prototype.js like DOM-Traversal
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
Description
Hi,
I just started diving into the new DOM features that came with PHP 8.4, and wondered if it's possible (and/or in the focus of HTMLDocument) to add some of Prototype's DOM traversal and enumerable features. Prototype may have vanished from the web, but its intuitive traversal methods are to this day unmatched and made working on a HTML tree a breeze.
I've implemented this in PHP before, but it was a pain fighting against the quirks of DOMDocument, XML and the countless DOMNode subclasses, it felt very messy to begin with.
Now before I attempt to implement this again in userland with HTMLDocument: is there any chance to even consider such features, or is this out of focus?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the HTMLDocument DOM features introduced in PHP 8.4 and compare the requested traversal and enumerable behavior with the linked Prototype APIs. Review the existing userland implementation in chillerlan/php-prototype-dom, then use the issue discussion to establish whether this belongs in HTMLDocument and what feature scope would count as done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100