Protocols

The following protocols are available globally.

  • A JavaScript expression that can be evaluated inside of a web view (WKWebView).

    The library provides ready-to-use expression implementations:

    You don’t need to implement this protocol yourself.

    Expressions are specialized with the ReturnType associated type. Expressions can return any Decodable type. This includes:

    • JSVoid for expressions that do not return a value
    • Primitive values (Strings, Numbers, Booleans, …)
    • Decodable enumerations
    • Objects decodable from JSON
    • Arrays of primitive values
    • Arrays of enumeration cases
    • Arrays of objects
    • Native dictionaries
    See more

    Declaration

    Swift

    public protocol JSExpression