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:
JSVariableto access a variableJSFunctionto call a functionJSScriptto run a custom script
You don’t need to implement this protocol yourself.
Expressions are specialized with the
ReturnTypeassociated type. Expressions can return anyDecodabletype. This includes:JSVoidfor 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
Declaration
Swift
public protocol JSExpression
View on GitHub
Install in Dash
Protocols Reference