xul

An xmpp4moz notebook

I like documentation that looks like a laboratory notebook—not a linear and sure path from problem to solution, but a record of the paths tried, including the bad ones, reasons why they were bad, intuitions that led toward the solution, and ideas about where to go next.

SamePlace spinoffs #1: CSS Query

Before:


var xulScriptlet;
var blueprint = document.getElementById('blueprints').firstChild;
while(blueprint) {
    if(blueprint.getAttribute('class') == 'scriptlet')
        break;
    blueprint = blueprint.nextSibling;
}

var xulScriptlet = blueprint.cloneNode(true);
xulScriptlet.getElementsByAttribute('class', 'name')[0].value = 
    scriptlet.info.name;
xulScriptlet.getElementsByAttribute('class', 'version')[0].value = 
    scriptlet.info.version;
document.getElementById('scriptlets').appendChild(xulScriptlet);

After...

Syndicate content