OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 4329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4340 | 4340 |
4341 // TODO(dcarney): Deprecate and remove previous typedefs, and replace | 4341 // TODO(dcarney): Deprecate and remove previous typedefs, and replace |
4342 // GenericNamedPropertyFooCallback with just NamedPropertyFooCallback. | 4342 // GenericNamedPropertyFooCallback with just NamedPropertyFooCallback. |
4343 /** | 4343 /** |
4344 * GenericNamedProperty[Getter|Setter] are used as interceptors on object. | 4344 * GenericNamedProperty[Getter|Setter] are used as interceptors on object. |
4345 * See ObjectTemplate::SetNamedPropertyHandler. | 4345 * See ObjectTemplate::SetNamedPropertyHandler. |
4346 */ | 4346 */ |
4347 typedef void (*GenericNamedPropertyGetterCallback)( | 4347 typedef void (*GenericNamedPropertyGetterCallback)( |
4348 Local<Name> property, const PropertyCallbackInfo<Value>& info); | 4348 Local<Name> property, const PropertyCallbackInfo<Value>& info); |
4349 | 4349 |
4350 | |
4351 /** | 4350 /** |
4352 * Returns the value if the setter intercepts the request. | 4351 * Interceptor for set requests on an object. |
4353 * Otherwise, returns an empty handle. | 4352 * |
| 4353 * Use `info.GetReturnValue()` to indicate whether the request was intercepted |
| 4354 * or not. If the setter successfully intercepts the request, i.e., if the |
| 4355 * request should not be further executed, call |
| 4356 * `info.GetReturnValue().Set(value)`. If the setter |
| 4357 * did not intercept the request, i.e., if the request should be handled as |
| 4358 * if no interceptor is present, do not not call `Set()`. |
| 4359 * |
| 4360 * \param property The name of the property for which the request was |
| 4361 * intercepted. |
| 4362 * \param value The value which the property will have if the request |
| 4363 * is not intercepted. |
| 4364 * \param info Information about the intercepted request, such as |
| 4365 * isolate, receiver, return value, or whether running in `'use strict'` mode. |
| 4366 * See `PropertyCallbackInfo`. |
| 4367 * |
| 4368 * See also |
| 4369 * `ObjectTemplate::SetNamedPropertyHandler.` |
4354 */ | 4370 */ |
4355 typedef void (*GenericNamedPropertySetterCallback)( | 4371 typedef void (*GenericNamedPropertySetterCallback)( |
4356 Local<Name> property, Local<Value> value, | 4372 Local<Name> property, Local<Value> value, |
4357 const PropertyCallbackInfo<Value>& info); | 4373 const PropertyCallbackInfo<Value>& info); |
4358 | 4374 |
4359 | 4375 |
4360 /** | 4376 /** |
4361 * Returns a non-empty handle if the interceptor intercepts the request. | 4377 * Returns a non-empty handle if the interceptor intercepts the request. |
4362 * The result is an integer encoding property attributes (like v8::None, | 4378 * The result is an integer encoding property attributes (like v8::None, |
4363 * v8::DontEnum, etc.) | 4379 * v8::DontEnum, etc.) |
(...skipping 4660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9024 */ | 9040 */ |
9025 | 9041 |
9026 | 9042 |
9027 } // namespace v8 | 9043 } // namespace v8 |
9028 | 9044 |
9029 | 9045 |
9030 #undef TYPE_CHECK | 9046 #undef TYPE_CHECK |
9031 | 9047 |
9032 | 9048 |
9033 #endif // INCLUDE_V8_H_ | 9049 #endif // INCLUDE_V8_H_ |
OLD | NEW |