Expose more meta information for plugins
Summary: expose `appName`, `appId` and `device` to Sandy plugins. Will be used in next diff to migrate navigation plugin Reviewed By: cekkaewnumchai Differential Revision: D24857253 fbshipit-source-id: 03ac3d376d5d1950bcf3d78386a65ce167b517e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9b4e7e873c
commit
1157976eef
@@ -36,6 +36,20 @@ export function plugin(client: PluginClient<Events, Methods>) {
|
||||
|
||||
The `PluginClient` received by the `plugin` exposes the following members:
|
||||
|
||||
### Properties
|
||||
|
||||
#### `device`
|
||||
|
||||
Returns the [`Device`](#device) this plugin is connected to.
|
||||
|
||||
#### `appName`
|
||||
|
||||
The name of the application, for example 'Facebook', 'Instagram' or 'Slack'.
|
||||
|
||||
#### `appId`
|
||||
|
||||
A string that uniquely identifies the current application, is based on a combination of the application name and device serial on which the application is running.
|
||||
|
||||
### Events listeners
|
||||
|
||||
#### `onMessage`
|
||||
|
||||
Reference in New Issue
Block a user