rem: var sourceObject = e.sourceObject.frame.contentDocument.body; 
add: var sourceObject = getContentDocument(e.sourceObject.frame).body; 
context: function cmdTextDirection(e){    var direction;    var sourceObject = e.sourceObject.frame.contentDocument.body;    switch (e.dir)    {        case "toggle":            if (sourceObject.getAttribute("dir") == "rtl")                direction = 'ltr';            else                direction = 'rtl';            break;        case "rtl":            direction = 'rtl';            break;        default:            // that is "case "ltr":",            // but even if !e.dir OR e.dir is an invalid value -> set to            // default direction            direction = 'ltr';    }    client.input.setAttribute("dir", direction);    sourceObject.setAttribute("dir", direction);    return true;}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/a3e839fe5b35a608da653750f2126d4c87be6b9f/commands.js/clean/extensions/irc/xul/content/commands.js