On Wed, Apr 29, 2009 at 7:41 PM, Mike Belshe <[email protected]> wrote: > On Wed, Apr 29, 2009 at 6:47 PM, Marshall Greenblatt >> 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? > > No plans to do that. Keep in mind that exposing C++ directly to JS should > be done with great care. Remember you're expanding the surface area of > attack.
There are extensive C++ APIs to V8 do this kind of thing at minute levels of detail. What Extensions are providing are a simple and powerful high-level API to bridge a JS frontend to a C++ backend. You write your beautiful JavaScripty API in JS, and funnel all the calls down to these native functions. If you want the kind of control you're talking about, you could use v8 directly: http://code.google.com/apis/v8/intro.html - a --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
