javascript - how to do something when property created with pure js -


i want when new property added object named session. example, create new property :

session["name"] = 'yoza'; 

when session.name created, need something.

how that?

you use setter function. like

session.set = function(property, value){     session[property]=value;     somecallback(); } 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -