clearscript - Javascript prototype reflection function -
i'm not sure of name of i'd goes this:
currently, have bunch of variables in javascript context $a126 or $b15.
before running, have load in 9000 of these variables , current values later parts of code can reference $xxx value.
the preloading not efficient @ , causing bottleneck.
as there substantial amount of code uses $xxx notation wondering if possible create universal alter $.xxx $ function performed lookup of value passed via after period.
so $.xxx analogous getitem(xxx)
this javascript environment in c# using clearscript, though don't think impact answer.
it looks like
function field(val){ var value = val; this.__definegetter__("xxx", function(){ homecoming value; }); this.__definesetter__("value2", function(val){ value = val; }); } var field = new field("test"); console.log(field.xxx)
---> 'test'
that illustration of i'm looking for. problem have general definegetter doesn't particular getter name.
javascript clearscript
No comments:
Post a Comment