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.
Such as, there is a Java class like
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.