OK, here is the test: ``` fun testRead() { ...
# javascript
a
OK, here is the test:
Copy code
fun testRead() {
        window.fetch("<https://drive.google.com/open?id=1w5e7fILMN83JGgB8WANJUYm8OW2s0WVO>").then {
            println("Fetched!")
            val string = it.body as String
            val xml = GDML.format.parse(GDML.serializer(), string)
            println(xml.world)
        }.catch {
            println("Fetch failed")
            println(it.message)
        }
    }
What should I change to make it work
g
Return this promise from the function See this issue, it also describes this workaround https://youtrack.jetbrains.com/issue/KT-22228