Open
Description
Since some browsers api are specific to the browser support, an annotation could validate the availability of the method in respect to the runtime. For example, a JSObject method/field annotated with:
public @interface Chrome {
public String version() default "";
}
or a generic:
public @interface Browser {
public String name() default "";
public String version() default "";
}
could be validated by a processor, that check if the method/field is available. The runtime would be given as parameter in the maven plugin.
This avoid runtime errors, and manual check from the developer.