SUGGESTED DOM ENHANCEMENTS
Suggested enhancements for the Document Object Model (DOM)
This page is intended for discussion on
firstname.lastname@example.org. I have
added the names of the people suggesting each particular
feature - or at least some people who are interested in
- Streaming DOM (so entire tree is not in memory):
Streaming requires three things:
(Michael Amster, Stephen R. Savitzky)
- Reliance on iterators for traversal, rather than indexing or link
- Allowing parent, child, and sibling links to be invalid at various
times. (In other words, an iterator can produce the next sibling even if
a node's nextSibling attribute is null.) (It might be better if there
were a way to distinguish _really_ empty links from ``lazy'' links).
- Allowing NodeList's to be static rather than ``live'' so that you can
use them in a program as collections of nodes which might be appended to
during a traversal.
- Node addressing or indexing. (Michael Amster)
- Threadsafing/concurrency. (ÁNOQ of the Sun)
- Update notifications (events when the DOM-tree/text changes).
The observer pattern is perfect for this.
(ÁNOQ of the Sun, Claude Zervas)
- Lazy text-loading (not quite sure if this is already possible).
(ÁNOQ of the Sun)
- Typesafe narrow from Node. Some typesafe way to cast a Node
into it's appropriate subclass. This could be done by using methods like
asElement, asText etc. or by using the visitor pattern. (I don't remember
who suggested this...)
- Iterators. We need to get NodeIterator back and possibly
TreeIterator. (Lots of people agree on this...)
- Join text. Some way to join two TextNodes. (Again I don't remember
who wrote this...)