Changeset 12000

Show
Ignore:
Timestamp:
01/11/08 05:11:13 (11 months ago)
Author:
dante
Message:

updated the test file-

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojox/trunk/highlight/tests/test_highlight.html

    r11629 r12000  
    5252                //dojo.require("dojox.highlight.languages._dynamic"); 
    5353                //dojo.require("dojox.highlight.languages._www"); 
    54          
     54 
     55                var lazyCode = function(){ 
     56                         
     57                        dojo.xhrGet({ 
     58                                url: "../../../dojo/_base.js", 
     59                                load: function(data){ 
     60                                        var n = dojo.byId("foobar"); 
     61                                        n.innerHTML = data.replace(/\</gi,"&lt;"); 
     62                                        dojo.addClass(n,"javascript");  
     63                                        dojox.highlight.init(n); 
     64                                } 
     65                        }); 
     66                };       
     67                dojo.addOnLoad(lazyCode);  
    5568 
    5669        </script> 
     
    671684&lt;/div&gt; 
    672685</code></pre> 
     686 
     687<p>Normal dojo-looking code 
     688 
     689<pre><code> 
     690dojo.provide("some.object"); 
     691dojo.declare("some.object",null,{ 
     692        param: "value", 
     693        _myMethod: function(/* Event */e){ 
     694                this.inherited(arguments); 
     695        }, 
     696        // comments 
     697        _another: function(){ 
     698                dojo.addClass("foo","hovered"); 
     699        } 
     700}); 
     701dojo.addOnLoad(function(){ 
     702        // 
     703        // comments with &lt;HTML&gt; inline 
     704        var d = dojo; 
     705        d.mixin(d,{ 
     706                foo: function(e){ 
     707                        d.bar(e); 
     708                }, 
     709                bar: function(e){ 
     710                        alert(e); 
     711                } 
     712        }); 
     713}); 
     714</code></pre> 
     715 
     716<p>Lazy, xhr'd code: 
     717 
     718<pre><code id="foobar"></code></pre>