scratchpad

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scratchpad [2009/10/19 20:13]
aspectscript
scratchpad [2010/05/11 23:08] (current)
aspectscript
Line 1: Line 1:
 ====== Scratchpad ====== ====== Scratchpad ======
  
-In this page you can interactively try AspectScript.  Just write some JavaScript code an press "Run!" The code will be automatically transformed and executed in the interal frame below.+In this page you can interactively try AspectScript.  Just write some JavaScript code an press "Run it!" The code will be automatically transformed and executed in the interal frame below. The HTML code on the second textarea is also appended to the resulting page, so the JavaScript code can access it.
  
 ======= Type your code in this text area... ======= ======= Type your code in this text area... =======
Line 13: Line 13:
 var adv = function(jp){ var adv = function(jp){
    var jps = document.getElementById("jps");    var jps = document.getElementById("jps");
-   jps.innerHTML += (jp + "<br>");+   jps.innerHTML += (jp + " ");
 }; };
 AspectScript.before(pc, adv); AspectScript.before(pc, adv);
  
-//all the following jps are seen by the aspect +//all the jps generated from here are seen by the aspect 
-function foo(){ +pc();
-+
-foo();+
 var x = 0; var x = 0;
-var obj = {f: 1}+var obj = {f: 1}
 +var fun = function(){};
 </textarea> </textarea>
  
 <textarea name="html" cols="52" rows="15"> <textarea name="html" cols="52" rows="15">
-<body> +<b>Sequences matched:</b>
-This is the list of join points seen by the aspect:+
 <div id="jps"></div> <div id="jps"></div>
-</body> 
 </textarea> </textarea>
  
 <br> <br>
 <div style="text-align: center;"> <div style="text-align: center;">
-<input type="submit" value="Run!">+<input style="font-size: 14pt;" type="submit" value="  Run it ">
 </div> </div>
 </form> </form>
  • scratchpad.1255983207.txt.gz
  • Last modified: 2009/10/19 20:13
  • by aspectscript