MathJax

Syntax Highlighter CSS (shCore.css)

Syntax Highlighter CSS (shThemeDefault.css)

Syntax Highlighter JS (shCore.js)

Syntax Highlighter JS (shAutoloader)

Highlight CSS (default.css)

Highlight JS (highlight.pack.js)

Syntax Highlighter CSS (custom.css)

Sunday, April 18, 2010

Hiding XUL elements on OSX on Firefox 3.5.8

I was recently confused as to why the following code would not work in a XUL overlay:

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!
Post a Comment