Tuesday, January 19, 2010

JS: Display window.navigator properties



While looking for a description of all the properties on window.navigator for FireFox, I discovered that it wasn't so easy to find, so I wrote some code that would print out the properties for whatever browser it was running in.  Here is the code:

    var out = "";
    for (var property in window.navigator) {
        out += property;
        out += " = ";
        out += eval("window.navigator." + property);
        out += "<" + "br" + ">"; 
    }
    
    document.write(out);


window.navigator: