Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: include/v8.h

Issue 1367953002: Allow JavaScript accessors on API objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: review feedback Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4009 matching lines...) Expand 10 before | Expand all | Expand 10 after
4020 PropertyAttribute attributes = None); 4020 PropertyAttribute attributes = None);
4021 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); 4021 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value);
4022 4022
4023 void SetAccessorProperty( 4023 void SetAccessorProperty(
4024 Local<Name> name, 4024 Local<Name> name,
4025 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), 4025 Local<FunctionTemplate> getter = Local<FunctionTemplate>(),
4026 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), 4026 Local<FunctionTemplate> setter = Local<FunctionTemplate>(),
4027 PropertyAttribute attribute = None, 4027 PropertyAttribute attribute = None,
4028 AccessControl settings = DEFAULT); 4028 AccessControl settings = DEFAULT);
4029 4029
4030 #ifdef V8_JS_ACCESSORS
4031 void SetAccessorProperty(Local<Name> name,
4032 Local<Function> getter = Local<Function>(),
4033 Local<Function> setter = Local<Function>(),
4034 PropertyAttribute attribute = None);
4035 #endif // V8_JS_ACCESSORS
4036
4030 /** 4037 /**
4031 * Whenever the property with the given name is accessed on objects 4038 * Whenever the property with the given name is accessed on objects
4032 * created from this Template the getter and setter callbacks 4039 * created from this Template the getter and setter callbacks
4033 * are called instead of getting and setting the property directly 4040 * are called instead of getting and setting the property directly
4034 * on the JavaScript object. 4041 * on the JavaScript object.
4035 * 4042 *
4036 * \param name The name of the property for which an accessor is added. 4043 * \param name The name of the property for which an accessor is added.
4037 * \param getter The callback to invoke when getting the property. 4044 * \param getter The callback to invoke when getting the property.
4038 * \param setter The callback to invoke when setting the property. 4045 * \param setter The callback to invoke when setting the property.
4039 * \param data A piece of data that will be passed to the getter and setter 4046 * \param data A piece of data that will be passed to the getter and setter
(...skipping 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after
8347 */ 8354 */
8348 8355
8349 8356
8350 } // namespace v8 8357 } // namespace v8
8351 8358
8352 8359
8353 #undef TYPE_CHECK 8360 #undef TYPE_CHECK
8354 8361
8355 8362
8356 #endif // V8_H_ 8363 #endif // V8_H_
OLDNEW
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698