H
HopfZ
I made two shortcut functions for document.getElementById as:
function EBI2(id){return document.getElementById(id)};
var EBI3 = document.getElementById;
But EBI3 don't work.
EBI2('myText'); //works
EBI3('myText'); //unexpected error
The error message for EBI3 according to Firebug Firefox(1.5.0.4)
extension is:
uncaught exception: [Exception... "Illegal operation on WrappedNative
prototype object" nsresult: "0x8057000c
(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: javascript:
with (FireBugEval.api) { with (window) {
FireBugEval(eval(FireBugEval.expr)) }} :: <TOP_LEVEL> :: line 1" data:
no]
Is EBI3 a bad way?
function EBI2(id){return document.getElementById(id)};
var EBI3 = document.getElementById;
But EBI3 don't work.
EBI2('myText'); //works
EBI3('myText'); //unexpected error
The error message for EBI3 according to Firebug Firefox(1.5.0.4)
extension is:
uncaught exception: [Exception... "Illegal operation on WrappedNative
prototype object" nsresult: "0x8057000c
(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: javascript:
with (FireBugEval.api) { with (window) {
FireBugEval(eval(FireBugEval.expr)) }} :: <TOP_LEVEL> :: line 1" data:
no]
Is EBI3 a bad way?