mirror of
https://github.com/sigmasternchen/Wish
synced 2025-03-15 07:28:56 +00:00
we can now merge functions... not smart, but it works...
This commit is contained in:
parent
a5f8e1bde7
commit
d4fe00eec1
1 changed files with 10 additions and 0 deletions
10
main.js
10
main.js
|
@ -42,6 +42,16 @@ function clone(object){
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function extendFunction(function1, function2) {
|
||||||
|
// I guess, we don't need more than 5 parameters.
|
||||||
|
return new Function("a, b, c, d, e", "\
|
||||||
|
var tmp1 = (" + function1.toString() + ")(a, b, c, d, e);\
|
||||||
|
var tmp2 = (" + function2.toString() + ")(a, b, c, d, e);\
|
||||||
|
return tmp1 | tmp2" // Problem if one return-value is an Object-
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var main = function () {
|
var main = function () {
|
||||||
Emulator.init(document.getElementById("output"), document.forms['form'].elements['input'], 80, 24);
|
Emulator.init(document.getElementById("output"), document.forms['form'].elements['input'], 80, 24);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue