Type alias: FeatureDefinition<O>

Ƭ FeatureDefinition<O>: { defaultOptions: Required<O> ; identifier: string ; script: string }

A minimal set of attributes to define a feature.

Type parameters:

NameTypeDescription
O{}A type describing the shape of the JSON-serializable object that will be passed to the Web script.

Type declaration:

NameTypeDescription
defaultOptionsRequired<O>These options will be shallow-merged with the options provided to the FeatureClass.
identifierstringA 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
scriptstringThe 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.