Skip to main content

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

NameType
idstring
options?CmdCreateContextOptions | ContextType

Returns

any

Any

Interface: CmdCreateContextOptions

NameTypeDescription
type?ContextType
rendererId?number

ContextType

Ƭ ContextType: "video" | "custom-native-component" | "webview-component" | "editor"