diff --git a/docs/src/js.md b/docs/src/js.md index 793ce3090c..1c785345d6 100644 --- a/docs/src/js.md +++ b/docs/src/js.md @@ -33,6 +33,9 @@ using `{}` for substitution: Parameters must be converted to a [JsonElement](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-element/), for example by using the [json](https://docs.kweb.io/api/kweb-core/kweb.util/json.html) extension property. +Note that if you need an empty JavaScript object just use `{ }` instead of `{}`, which will prevent +it from being interpreted as a parameter. + ## Function caching and preloading Kotlin automatically caches JavaScript functions in the browser for efficiency. If the function is