diff --git a/java/jsinterop/annotations/JsProperty.java b/java/jsinterop/annotations/JsProperty.java index 1f2a97f..e059686 100644 --- a/java/jsinterop/annotations/JsProperty.java +++ b/java/jsinterop/annotations/JsProperty.java @@ -27,8 +27,8 @@ * *
If it is applied to a method, it will be treated as a property accessor. As a result, instead * of translating method calls to JsProperty methods as method calls in JS, they will be translated - * as property lookups. When a JsProperty method implemented by a Java class, such methods will be - * generated as property accessor in JavaScript, hence the property access will trigger the + * as property lookups. When a JsProperty method is implemented by a Java class, such methods will + * be generated as property accessors in JavaScript, hence the property access will trigger the * execution of the matching getter or setter methods. * *
JsProperty follows JavaBean style naming convention to extract the default property name. If @@ -39,6 +39,11 @@ *
When applied to {@code record} components, the annotation will only apply to the accessor and + * not to the field - otherwise this would result in a naming conflict. Additionally, the JavaBean + * style convention is not required, as record accessors do not being with {@code get-} or + * {@code is-}. + * *
Note: In JavaScript, instance members are defined on the prototype and class members are * defined on the constructor function of the type which mimics ES6 class style. */ diff --git a/java/jsinterop/annotations/JsType.java b/java/jsinterop/annotations/JsType.java index f7fda98..258dced 100644 --- a/java/jsinterop/annotations/JsType.java +++ b/java/jsinterop/annotations/JsType.java @@ -28,7 +28,7 @@ * *
Marking an object with JsType is similar to marking each public member of the class with * {@link JsProperty}/{@link JsMethod}/{@link JsConstructor} respectively. In order for this to work - * correctly the JavaScript name needs to be unique for each member. Some unobvious ways to cause + * correctly the JavaScript name needs to be unique for each member. Some nonobvious ways to cause * name collisions are: * *