-
Couldn't load subscription status.
- Fork 18
Description
With 0.5.0 version, some API (e.g. window.fetch, cache.match) do not allow option-less calls (when compiling to k/js).
Without kotlinx-browser it used to be possible to call just window.fetch(resPath).
But now there is an error: [NO_VALUE_FOR_PARAMETER] No value passed for parameter 'init'.
Adding an empty init leads to another error.
val response = window.fetch(resPath, RequestInit())CoroutineExceptionHandlerImpl.kt:7 TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'cache' property from 'RequestInit': The provided value 'null' is not a valid enum value of type RequestCache.
val response = window.fetch(resPath, RequestInit(cache = RequestCache.NO_CACHE))TypeError: Failed to execute 'fetch' on 'Window': Failed to read the 'credentials' property from 'RequestInit': The provided value 'null' is not a valid enum value of type RequestCredentials.
And etc...
At the same time, k/wasm target compiles and works as usual.
Looks like it's related to #17, but still here we have a different issue with k/js that a plain API call without init is not possible right now.