var foo = document.getElementById("foo"); foo.style.display = "none";
In this case, the element foo was a XUL element; not HTML. Further investigation found that the above code worked on Windows and Linux builds of Firefox, but not OSX; only the following appeased the Firefox gods:
var foo = document.getElementById("foo"); foo.hidden = true;
This does what you want on all platforms; not especially obvious from the austere MDC article!