summaryrefslogtreecommitdiff
path: root/js/dojo/dojox/help/demos/demo_Console.html
diff options
context:
space:
mode:
Diffstat (limited to 'js/dojo/dojox/help/demos/demo_Console.html')
-rw-r--r--js/dojo/dojox/help/demos/demo_Console.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/js/dojo/dojox/help/demos/demo_Console.html b/js/dojo/dojox/help/demos/demo_Console.html
new file mode 100644
index 0000000..ce33546
--- /dev/null
+++ b/js/dojo/dojox/help/demos/demo_Console.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <title>Simple demo of dojox.help.console</title>
+ <script src="../../../dojo/dojo.js" type="text/javascript" djConfig="isDebug: true"></script>
+ <script type="text/javascript">
+ dojo.addOnLoad(function(){
+ dojo.query("code").onclick(function(e){
+ var cmd = e.target.innerHTML;
+ if(cmd.slice(-1) == ";"){
+ dojo.eval(cmd);
+ }else{
+ console.log(dojo.getObject(cmd));
+ }
+ });
+ });
+ </script>
+ </head>
+ <body>
+ <p>You'll want to open up Firebug for this</p>
+ <p>Click each of the items below to run the command:</p>
+ <ul>
+ <li><code>dojo.require("dojox.help.console");</code></li>
+ <li><code>dojox.help.locate("Xhr", dojo);</code> searches variable names in the dojo namespaces for "Xhr" (no matter the case).</li>
+ <li><code>dojo.query.help();</code> displays help for dojo.byId</li>
+ <li><code>dojo.connect</code> loads and displays the function signature for dojo.connect</li>
+ <li><code>dojo.isBrowser</code> shows an example of a "conflict". It's using the Boolean object rather than the boolean generic.</li>
+ <li><code>dojox.help.noConflict();</code> fixes this conflict (click on <code>dojo.isBrowser</code> again).</li>
+ <li><code>dojox.help.refresh();</code> parses the page again!</li>
+ <li><code>dojo.isBrowser</code> and the conflict is back again!</li>
+ </ul>
+ </body>
+</html>