Annotation Interface JS.Import

Enclosing class:
JS

@Retention(RUNTIME) @Target(TYPE) public static @interface JS.Import
Denotes that the annotated class represents a JavaScript class from the global scope. The annotated class must be a direct subclass of the JSObject class. For more information, see JSObject documentation.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Denotes the name of the JavaScript class that is being imported.
  • Element Details

    • value

      String value
      Denotes the name of the JavaScript class that is being imported. The default value is an empty string, which means that the name of the JavaScript class corresponds to the name of the Java class. Example usage:
      @JS.Import("HTMLDocument")
      public class HTMLDocumentImpl extends JSObject {
      }
      
      Returns:
      Name of the JavaScript class that the annotated Java class should correspond to.
      Default:
      ""