Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 8fc9149671a9795d3a797e543d8f8ae4f29c3ba6..7085c00dfa4acf4aba814973d543d719d43b9069 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -4543,11 +4543,26 @@ typedef void (*GenericNamedPropertySetterCallback)( |
Local<Name> property, Local<Value> value, |
const PropertyCallbackInfo<Value>& info); |
- |
/** |
- * Returns a non-empty handle if the interceptor intercepts the request. |
- * The result is an integer encoding property attributes (like v8::None, |
- * v8::DontEnum, etc.) |
+ * Intercepts all requests that query the attributes of the |
+ * property, e.g., getOwnPropertyDescriptor(), propertyIsEnumerable(), and |
+ * defineProperty(). |
+ * |
+ * Use `info.GetReturnValue().Set(value)` to set the property attributes. The |
+ * value is an interger encoding a `v8::PropertyAttribute`. |
+ * |
+ * \param property The name of the property for which the request was |
+ * intercepted. |
+ * \param info Information about the intercepted request, such as |
+ * isolate, receiver, return value, or whether running in `'use strict'` mode. |
+ * See `PropertyCallbackInfo`. |
+ * |
+ * \note Some functions query the property attributes internally, even though |
+ * they do not return the attributes. For example, `hasOwnProperty()` can |
+ * trigger this interceptor depending on the state of the object. |
+ * |
+ * See also |
+ * `ObjectTemplate::SetNamedPropertyHandler.` |
*/ |
typedef void (*GenericNamedPropertyQueryCallback)( |
Local<Name> property, const PropertyCallbackInfo<Integer>& info); |