Document Object Model Utility Widgets

Test page with source code
Mozilla’s XUL widgets are great; I love them to death. But for another application I’m developing,
where it’s important to see the structure of a node, and to keep several nodes identical after mutations, XUL just doesn’t have those capabilities. (It wasn’t designed to. Not mozilla.org’s fault.)
So, over the last few days, I’ve come up with the following test page, complete with four new DOM-related widgets and one (independent) function which should help me keep my XUL code in working order.
The new independent function I filed an enhancement bug for adding to Mozilla. It’s a JavaScript-based assert() function, probably not quite in line with how other assert() macros work… but it’s a start.
All this code is under the MPL tri-license, so please do offer feedback, particularly improvements!
UPDATE: Added a new widget which I hope to propose for the Mozilla suite, <xul:menuDeck/>. It selects an entry out of a deck based on a corresponding menuitem being selected.