Even the bare basics of mootools helps me so much in javascript. So in
Rhino I've removed the window dependants and stripped everything but:
Core
Native
Array
Function
Number
String
Hash
Event
Class
Class.Extras
----------------------------------------------------
So I get to run:
----------------------------------------------------
load('mootools-bare.js');
function main() {
print(this.foo);
}
main.bind({foo: 1})();
var Person = new Class({
initialize: function(name) {
this.name = name;
}
});
var myPerson = new Person('Billy');
print(myPerson.name);
var cChain = new Chain();
cChain.chain(
function (){ print(1); },
function (){ print(2); },
function (){ print(3); },
function (){ print(4); }
);
while(cChain.callChain() !== false) {}
On Jan 16, 9:56 am, hellspawn <[email protected]> wrote:
> hi
> is there any way to be able to run scripts built with mootools under a
> js shell - likerhino-spidermonkey ?
> I am trying to do this and of course I get errors related to missing
> "window" variable.
>
> thanks