Represents the contents of a single widget data message from the server, with a binary data paylod and exported
objects. Implemented both by Widget itself and by the event.details when data is received by the client.
Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use
"payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for
backwards compatibility and to better follow JS expectations.
Returns an array of exported objects sent from the server. The plugin implementation is now responsible for these
objects, and should close them when no longer needed.
Returns WidgetExportedObject[]
Methods
getDataAsBase64
getDataAsBase64(): string
Returns the data from this message as a base64-encoded string.
Returns string
getDataAsString
getDataAsString(): string
Returns the data from this message as a utf-8 string.
Returns string
getDataAsU8
getDataAsU8(): Uint8Array
Returns the data from this message as a Uint8Array.
Represents the contents of a single widget data message from the server, with a binary data paylod and exported objects. Implemented both by Widget itself and by the
event.detailswhen data is received by the client.Terminology note: the name of this type should probably use "Data" instead of "Message", and the methods should use "payload" rather than "data" to match other platforms and the protobuf itself. These names are instead used for backwards compatibility and to better follow JS expectations.