Type alias: FeatureDefinition<O>
Ƭ FeatureDefinition<O>: { defaultOptions: Required<O> ; identifier: string ; script: string }
A minimal set of attributes to define a feature.
Type parameters:
Name | Type | Description |
---|---|---|
O | {} | A type describing the shape of the JSON-serializable object that will be passed to the Web script. |
Type declaration:
Name | Type | Description |
---|---|---|
defaultOptions | Required<O> | These options will be shallow-merged with the options provided to the FeatureClass. |
identifier | string | A unique identifier of the feature. The convention is to use a reverse namespace domain ending with the feature name. example org.formidable-webview/webshell.link-press |
script | string | The string containing valid ECMAScript 5 to be run in the WebView. remarks The script must define a single function which only argument is of the type WebjsContext. It is recommended that you use eslint to validate this script syntax, and event better, unit-test the script. See our repository home page for more information. |