projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4314d7f
)
Added pre-defined 'events' object into user scripts
author
Darren
<darren@darrenwhitlen.com>
Tue, 25 Nov 2014 10:55:51 +0000
(10:55 +0000)
committer
Darren
<darren@darrenwhitlen.com>
Tue, 25 Nov 2014 10:55:51 +0000
(10:55 +0000)
client/src/applets/scripteditor.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/applets/scripteditor.js
b/client/src/applets/scripteditor.js
index 9c0afe1d6e92e903f24a64c98dc7fb28feccbb97..e427fb3031575d49f392ab0f140446590e399be0 100644
(file)
--- a/
client/src/applets/scripteditor.js
+++ b/
client/src/applets/scripteditor.js
@@
-39,10
+39,11
@@
// Build the user script up with some pre-defined components
script_content = 'var network = kiwi.components.Network();\n';
script_content += 'var input = kiwi.components.ControlInput();\n';
// Build the user script up with some pre-defined components
script_content = 'var network = kiwi.components.Network();\n';
script_content += 'var input = kiwi.components.ControlInput();\n';
+ script_content += 'var events = kiwi.components.Events();\n';
script_content += this.editor.getValue() + '\n';
// Add a dispose method to the user script for cleaning up
script_content += this.editor.getValue() + '\n';
// Add a dispose method to the user script for cleaning up
- script_content += 'this._dispose = function(){ network.off(); input.off(); if(this.dispose) this.dispose(); }';
+ script_content += 'this._dispose = function(){ network.off(); input.off();
events.dispose();
if(this.dispose) this.dispose(); }';
// Try to compile the user script
try {
// Try to compile the user script
try {