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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1072 | 1072 |
1073 /** | 1073 /** |
1074 * This is an unfinished experimental feature, and is only exposed | 1074 * This is an unfinished experimental feature, and is only exposed |
1075 * here for internal testing purposes. DO NOT USE. | 1075 * here for internal testing purposes. DO NOT USE. |
1076 * | 1076 * |
1077 * A compiled JavaScript module. | 1077 * A compiled JavaScript module. |
1078 */ | 1078 */ |
1079 class V8_EXPORT Module { | 1079 class V8_EXPORT Module { |
1080 public: | 1080 public: |
1081 /** | 1081 /** |
1082 * Returns the number of modules imported by this module. | |
1083 */ | |
neis
2016/09/20 21:07:30
s/imported/requested/, or say "imported or re-expo
adamk
2016/09/20 21:13:58
Done.
| |
1084 int GetModuleRequestsLength() const; | |
1085 | |
1086 /** | |
1087 * Returns the ith module specifier in this module. | |
1088 * i must be < GetModuleRequestsLength() and >= 0. | |
1089 */ | |
1090 Local<String> GetModuleRequest(int i) const; | |
1091 | |
1092 typedef MaybeLocal<Module> (*ResolveCallback)(Local<Context> context, | |
1093 Local<String> specifier, | |
1094 Local<Module> referrer, | |
1095 Local<Value> data); | |
1096 | |
1097 /** | |
1082 * ModuleDeclarationInstantiation | 1098 * ModuleDeclarationInstantiation |
1083 * | 1099 * |
1084 * Returns false if an exception occurred during instantiation. | 1100 * Returns false if an exception occurred during instantiation. |
1085 */ | 1101 */ |
1086 V8_WARN_UNUSED_RESULT bool Instantiate(Local<Context> context); | 1102 V8_WARN_UNUSED_RESULT bool Instantiate(Local<Context> context, |
1103 ResolveCallback callback, | |
1104 Local<Value> callback_data); | |
1087 | 1105 |
1088 /** | 1106 /** |
1089 * ModuleEvaluation | 1107 * ModuleEvaluation |
1090 */ | 1108 */ |
1091 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context); | 1109 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Evaluate(Local<Context> context); |
1092 }; | 1110 }; |
1093 | 1111 |
1094 /** | 1112 /** |
1095 * A compiled JavaScript script, tied to a Context which was active when the | 1113 * A compiled JavaScript script, tied to a Context which was active when the |
1096 * script was compiled. | 1114 * script was compiled. |
(...skipping 8450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9547 */ | 9565 */ |
9548 | 9566 |
9549 | 9567 |
9550 } // namespace v8 | 9568 } // namespace v8 |
9551 | 9569 |
9552 | 9570 |
9553 #undef TYPE_CHECK | 9571 #undef TYPE_CHECK |
9554 | 9572 |
9555 | 9573 |
9556 #endif // INCLUDE_V8_H_ | 9574 #endif // INCLUDE_V8_H_ |
OLD | NEW |