E
E
Evgeny Petrov2017-01-08 21:25:18
JavaScript
Evgeny Petrov, 2017-01-08 21:25:18

How to run get via set in Proxy javascript?

In general, the essence of the question is in the cap. How can this be implemented? For example:

new Proxy(stdGlobalVar,{
   get: function(obj,prop){
       //some code
   },
   set: function(obj,prop,value){
     // отсюда запустить get
  }
})

Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Petrov, 2017-01-08
@kazsat

Damn, it's just an ordinary object). Solution this.get();

D
dmz9, 2017-01-08
@dmz9

a read access to an object property starts a get.
just read this value and the code will be executed, no?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question