eclipsesource / eclipsesource/J2V8

Calling a JS function as a constructor from Java?

Open
#195 8 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

Let's say I have a reference to the built-in `Date` function:

```
V8Function dateConstructor = (V8Function) v8.get("Date");
```

From the Java side, how could I call this as a constructor `new Date()` instead of calling it as a function `Date()`?

Sorry if this is documented somewhere and I missed it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.