[Wasm] Don't use js("code") in browser API

Use internal newJsObject to create new objects instead.

This is a preparation for restricted js("code") support (KT-56955)
This commit is contained in:
Svyatoslav Kuzmich
2023-01-13 18:13:19 +01:00
committed by Space Team
parent 086d914f64
commit eb8c47343a
15 changed files with 96 additions and 96 deletions
@@ -22,10 +22,12 @@ fun main() {
}
}
// TODO: Backport to dukat
fun postProcessIdlBindings(source: String): String {
return source
.replace(
Regex("( {4}return o as \\w+)"),
" @Suppress(\"UNCHECKED_CAST_TO_EXTERNAL_INTERFACE\")\n\$1"
)
.replace("js(\"({})\")", "newJsObject()")
}