dojox/help/console.js

  • Provides:

    • dojox.help.console
  • Requires:

    • dojox.help._base in common
  • dojox.help._plainText

    • type
      Function
    • parameters:
      • str: (typeof )
    • source: [view]
        return str.replace(/(<[^>]*>|&[^;]{2,6};)/g, '');
    • summary
  • dojox.help._displayLocated

    • type
      Function
    • parameters:
      • located: (typeof )
    • source: [view]
        var obj = {};
        dojo.forEach(located, function(item){ obj[item[0]] = dojo.isMoz ? { toString: function(){ return "Click to view"; }, item: item[1] } : item[1]; });
        console.dir(obj);
    • summary
  • dojox.help._displayHelp

    • type
      Function
    • parameters:
      • loading: (typeof )
      • obj: (typeof )
    • source: [view]
        if(loading){
         var message = "Help for: " + obj.name;
         console.log(message);
         var underline = "";
         for(var i = 0; i < message.length; i++){
          underline += "=";
         }
         console.log(underline);
        }else if(!obj){
         console.log("No documentation for this object");
        }else{
         var anything = false;
         for(var attribute in obj){
          var value = obj[attribute];
          if(attribute == "returns" && obj.type != "Function" && obj.type != "Constructor"){
           continue;
          }
          if(value && (!dojo.isArray(value) || value.length)){
           anything = true;
           console.info(attribute.toUpperCase());
           value = dojo.isString(value) ? dojox.help._plainText(value) : value;
           if(attribute == "returns"){
            var returns = dojo.map(value.types || [], "return item.title;").join("|");
            if(value.summary){
             if(returns){
              returns += ": ";
             }
             returns += dojox.help._plainText(value.summary);
            }
            console.log(returns || "Uknown");
           }else if(attribute == "parameters"){
            for(var j = 0, parameter; parameter = value[j]; j++){
             var type = dojo.map(parameter.types, "return item.title").join("|");
             console.log((type) ? (parameter.name + ": " + type) : parameter.name);
             var summary = "";
             if(parameter.optional){
              summary += "Optional. ";
             }
             if(parameter.repating){
              summary += "Repeating. ";
             }
             summary += dojox.help._plainText(parameter.summary);
             if(summary){
              summary = " - " + summary;
              for(var k = 0; k < parameter.name.length; k++){
               summary = " " + summary;
              }
              console.log(summary);
             }
            }
           }else{
            console.log(value);
           }
          }
         }
         if(!anything){
          console.log("No documentation for this object");
         }
        }
    • summary
  • dojox.help.console

    • type
      Object
    • summary
  • dojox.help

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary