Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
QinBa opened this issue Nov 21, 2021 · 0 comments
Closed
Labels
scope: api.js The @tauri-apps/api npm package type: bug type: documentation Need to update the API documentation

Comments

@QinBa
Copy link

QinBa commented Nov 21, 2021

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.

@QinBa QinBa added the type: documentation Need to update the API documentation label Nov 21, 2021
@QinBa QinBa changed the title [docs] [docs] Example for "Events" in Guides has inconsistent payload from API doc Nov 21, 2021
@amrbashir amrbashir added scope: api.js The @tauri-apps/api npm package type: bug labels Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: api.js The @tauri-apps/api npm package type: bug type: documentation Need to update the API documentation
Projects
None yet
Development

No branches or pull requests

2 participants