Skip to content

[docs] Example for "Events" in Guides has inconsistent payload from API doc #2929

@QinBa

Description

@QinBa

In the example at https://tauri.studio/en/docs/guides/events/, emit takes javascript object as payload, see

emit('click', {
  theMessage: 'Tauri is awesome!'
})

However, in the actual API session on "event", see https://tauri.studio/en/docs/api/js/modules/event#emit. It says the payload should be "string".

I tried it out in an minimal example, it seems to me that I have to use string rather than js object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions