Mercurial > repos > tabletprog
comparison editor.js @ 23:068d63627b16
Populate in scope symbol buttons when clicking on a symbol in the source
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 26 Mar 2012 21:29:03 -0700 |
parents | a5ef5af3df0f |
children | 4d87c38404d6 |
comparison
equal
deleted
inserted
replaced
22:40a85f135be5 | 23:068d63627b16 |
---|---|
91 } | 91 } |
92 node.appendChild(base); | 92 node.appendChild(base); |
93 }; | 93 }; |
94 | 94 |
95 symbol.prototype.toHTML = function(node) { | 95 symbol.prototype.toHTML = function(node) { |
96 var astNode = this; | |
96 node.appendChild(newEl('span', { | 97 node.appendChild(newEl('span', { |
97 className: 'symbol', | 98 className: 'symbol', |
98 textContent: this.name | 99 textContent: this.name, |
100 onclick: function() { | |
101 return mainModule.symbolClick(this, astNode); | |
102 } | |
99 })); | 103 })); |
100 } | 104 } |