ok, people here is my amazing antigravity library. I'm trying to define it as an object literal, which, uh, i read all the cool kids are doing in order to to encapsulate their libraries. Basic tests indicate it's working properly, but I cannot seem to see document.body from inside my object.
what should happen is when I click on the page "It is working" should alert. Instead I get a document.body=null error. what gives? Where is my body? why can I not set a mouse event for it? I have wasted my whole friday day with this! Gah!
antigrav={
activate:function(){
// turn on antigrav
document.body.onmousedown = antigrav.startPan();
},
startPan:function(event){
alert('it is working!');
},
}
document.onload=antigrav.activate();