aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/embind/emval.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 7cdac6d9..45030b99 100755
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -19,6 +19,16 @@ Module.count_emval_handles = function() {
return count;
};
+/** @expose */
+Module.get_first_emval = function() {
+ for (var i = 0; i < _emval_handle_array.length; ++i) {
+ if (_emval_handle_array[i] !== undefined) {
+ return _emval_handle_array[i];
+ }
+ }
+ return null;
+};
+
// Private C++ API
function __emval_register(value) {