bn.createContext
▸ createContext(id, options?): any
description create render context object with component element id. no need to call createSelectorQuery any more
example
const videoContext = bn.createContext('test-id', 'video')
const webviewContext = bn.createContext('test-id', { type: 'webview-component', rendererId: 1 })
Parameters
| Name | Type |
|---|---|
id | string |
options? | CmdCreateContextOptions | ContextType |
Returns
any
Any
Interface: CmdCreateContextOptions
| Name | Type | Description |
|---|---|---|
| type? | ContextType | |
| rendererId? | number |
ContextType
Ƭ ContextType: "video" | "custom-native-component" | "webview-component" | "editor"