[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:
committed by
Space Team
parent
086d914f64
commit
eb8c47343a
@@ -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()")
|
||||
}
|
||||
Reference in New Issue
Block a user