org.apidesign.bck2brwsr.core

## Annotation Type JavaScriptPrototype

-     @Retention(value=CLASS)
       @Target(value=TYPE)
      public @interface JavaScriptPrototype

  Influence the inheritance of your class when converted to JavaScript. Sometimes one does not want to mimic the Java hierarchy, but modify it a bit. For example it makes sense to treat every (JavaScript) string literal as `String`. One can do it by making `String` subclass JavaScript `String` and use `String.prototype` as a container for all `String` methods.
  Author:
    Jaroslav Tulach

- - ### Required Element Summary

    Required Elements
    Modifier and Type | Required Element and Description
    --- | ---
    `String` | `prototype` Expression that defines the way to construct prototype for this class.

  - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `String` | `container` Expression that identifies the function where all methods should be added into.

- - ### Element Detail

    - #### prototype

          public abstract String prototype

      Expression that defines the way to construct prototype for this class.
      Returns:
        expression to construct prototype

  - - #### container

          public abstract String container

      Expression that identifies the function where all methods should be added into. If this attribute is unspecified all methods are added to the same object specified by `prototype()`.
      Returns:
        name of function to contain methods found in given class
      Default:
        ""

Copyright © 2025 API Design. All Rights Reserved.