这是开发预览网站。请访问正式文档 lynxjs.org

Home > @lynx-js/genui > MessageProcessor

MessageProcessor class

Signature:

export declare class MessageProcessor 

Constructors

Constructor

Modifiers

Description

(constructor)()

Constructs a new instance of the MessageProcessor class

Properties

Property

Modifiers

Type

Description

surfaces

Map<string, Surface>

Methods

Method

Modifiers

Description

clearSurfaces()

dispatch(message)

getOrCreateSurface(surfaceId)

getSurfaces()

onEvent(callback)

onUpdate(callback)

processMessages(messages)

resolvePath(path, dataContextPath)

Resolve a JSON Pointer taking into account the current data context.

  • Absolute paths (starting with '/') are returned as-is. - Relative paths are resolved against the provided dataContextPath.