eclipsesource / eclipsesource/J2V8

How to bind a JAVA object's property to a javascript object's property

Open
#522 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

Such as,
there is a Java class like
```
class Screen {
private double _width;
public double getWidth {
return _width;
}
public void setWidth(width) {
_width = width;
}
}
```

I want to bind a Screen object to javascript, and use like "screen.width = 200.0;" in the javascript environment. The Java Object method "setWidth" method is called When the assignment occurs. How to implement it? I will glad to receive your answer.

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.