Possible Duplicate:
JavaScript function aliasing doesn't seem to work
Why doesn't this work?
function foo() {
var g = document.getElementById;
g('sampleID');
}
This error is thrown in Chrome: Uncaught TypeError: Illegal invocation
... and in Firefox: Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"
It works in IE9 beta though !!