Victor Turansky

Results 74 comments of Victor Turansky

@Jessidhia could you, please, review these changes?

> suggested to use a custom handler like this Current implementation with `setTimeout` has big bonus - it shows errors by default > with `setTimeout` exceptions can arrive unordered I...

> Overriding name for custom errors is normal practice[[1](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#custom_error_types)] and improves DX In current implementation it can clash with standard error names - it's what we should avoid

> usually it describes a group of similar exceptions, in this case, it could be "something from coroutines" Default expectation - some constant and unique name like `"UnhandledKotlinWasmCoroutinesError"`

@murfel also for WasmJS it's important, that you can receive [`JsException`](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.js/-js-exception/), which can contains original js `Error`, which you can/should use without redundant wrapping. 4. `Throwable.toJsException` -> `Throwable.toJsError` ([JsError](https://github.com/JetBrains/kotlin-wrappers/blob/ecaa0909fb2e7cd1c5eebf20464db60cd001f460/kotlin-js-core/src/commonMain/kotlin/js/errors/JsError.kt#L9))

@murfel please use standard [reportError](https://developer.mozilla.org/en-US/docs/Web/API/Window/reportError) by default. Workaround with `setTimeout` required for Node.js only. [Declaration](https://github.com/JetBrains/kotlin-wrappers/blob/3d7419234a45f7f8a31ea9274f6909ecd63734c6/kotlin-browser/src/webMain/generated/web/errors/reportError.kt)

@mani1232 are you ready to generate it yourself? With [Karakum](https://github.com/karakum-team/karakum)

Looks fine. On `wasmJs` target you can't extend external types (`WebGLRenderParameters` in your case). If following case you can use `unsafeJso` factory function.

JFUI WebGPU declarations is already [here](https://github.com/JetBrains/kotlin-wrappers/tree/master/kotlin-web/src/webMain/generated/web/gpu) ;)