I was wondering if there is a way to emulate the PHP magic methods __get () and __set () in Node. From this question: JavaScript getter for all properties I know you can do this in Rhino, but Node is built on V8. Is there a way for V8 to do this?
No answer? Check out nowjs. They seemed to find a way to make __get () and __set () work in JavaScript. I can not understand how they do it from the source code. :(
EDIT: Check out Monitoring all the properties of a JavaScript object (magic getters and setters)
, , 2010 . , __defineGetter__ __defineSetter__, , . , , __noSuchMethod__/__get/method_missing , . , .
__defineGetter__
__defineSetter__
__noSuchMethod__
__get
method_missing
See my next answer , which explains how to solve this problem with ES6 Proxy .
Source: https://habr.com/ru/post/1782954/More articles:Checking scroll visibility - visibilityHow to receive a message using groovy listening on a port? - command-line-interfaceXSLT: Convert XML to HTML - No Line Breaks - xmlWhat is better handled for arrays? - phpInteractions / communication between C ++ and a Java program - javaWhat is a good java data structure for storing nested elements (e.g. cities in states)? - javaHow to document an XML schema? - xmlFilter Design for Audio - filterFlickering on redrawing JPanel inside JScrollPane - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1782959/coretext-drawing-receiving-touches-touch-coordinates-messed-up&usg=ALkJrhjsZpRumopr0s6OMZFLBOhODd4dVwAll Articles