What am I missing here with a call to `js(...)`
# webassembly
s
What am I missing here with a call to
js(...)
Copy code
actual fun openWebpage(url: String) {
        js("window.open(url, '_blank').focus()")
    }
but I get this error when I try to run my app
Calls to 'js(code)' should be a single expression inside a top-level function body or a property initializer in Kotlin/Wasm.
Ah, think I found my problem: The
js()
function is only allowed to be called from package-level functions.
👀 2