prototype - Hack Javascript Definitions for "undefined" objects -
so i'm not entirely sure possible, curious if possible hack definitions of "undefined" objects. primarily, purpose of prevent errors launching when doing .replace on object undefined. possible go "back end" (is there such thing??) , add method undefined object (if defined in first place??). along likes of
undefined.prototype.replace = function(v,r){ return false };
obviously works string or object, undefined, seems to, nature, have no definition. feels should still able mess it, since javascript has available end result.
thanks time! i'm curious pop here!
edit: main issue co-developing 8 other developers versioning control, , of newer people come in aren't familiar javascript (or error handling matter), wanted make global handler minute errors can receive default returns if necessary. doesn't idea work. maybe global try , catch scenario?
4.3.2 primitive value
member of 1 of types undefined, null, boolean, number, or string defined in clause 8.
note primitive value datum represented directly @ lowest level of language implementation.
4.3.10 undefined type
type sole value undefined value.
as can see undefined
primitive value, , such can't define properties it. because it's not object. best way think of null
. difference null
means intentional emptyness, while undefined
default value , type variables yet defined.
Comments
Post a Comment