On Thu, Apr 30, 2009 at 1:51 PM, Matt Perry <mpcompl...@google.com> wrote:
> On Wed, Apr 29, 2009 at 6:47 PM, Marshall Greenblatt < > magreenbl...@gmail.com> wrote: > >> 3. Is there a way to specify native getter/setter functions for a property >> defined on the JS side? For instance, "myobject.foo = bar" would somehow >> call a natively defined "setFoo" function with the "bar" argument. If this >> isn't possible, are there any plans to support native properties directly? > > > You can always use __define[SG]etter__. > See webkit/extensions/v8/gears_extension.cc for an example. > Cool, thanks :-). Now that I know what search terms to use, here's the JS 1.5 documentation on the topic for anyone else who's interested: https://developer.mozilla.org/En/Core_JavaScript_1.5_Guide:Creating_New_Objects:Defining_Getters_and_Setters - Marshall --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: chromium-dev@googlegroups.com View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---