components/resources/library/src/jsMain/kotlin/org/jetbrains/compose/resources/ResourceReader.js.kt [56:75]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override suspend fun read(path: String): ByteArray { return readByteArray(path) } override suspend fun readPart(path: String, offset: Long, size: Long): ByteArray { return readByteArray(path).sliceArray(offset.toInt() until (offset + size).toInt()) } override fun getUri(path: String): String { val location = window.location return getResourceUrl(location.origin, location.pathname, path) } private fun readByteArray(path: String): ByteArray { val resPath = WebResourcesConfiguration.getResourcePath(path) val request = XMLHttpRequest() request.open("GET", resPath, false) request.overrideMimeType("text/plain; charset=x-user-defined") request.send() if (request.status == 200.toShort()) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - components/resources/library/src/wasmJsMain/kotlin/org/jetbrains/compose/resources/ResourceReader.wasmJs.kt [81:100]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override suspend fun read(path: String): ByteArray { return readByteArray(path) } override suspend fun readPart(path: String, offset: Long, size: Long): ByteArray { return readByteArray(path).sliceArray(offset.toInt() until (offset + size).toInt()) } override fun getUri(path: String): String { val location = window.location return getResourceUrl(location.origin, location.pathname, path) } private fun readByteArray(path: String): ByteArray { val resPath = WebResourcesConfiguration.getResourcePath(path) val request = XMLHttpRequest() request.open("GET", resPath, false) request.overrideMimeType("text/plain; charset=x-user-defined") request.send() if (request.status == 200.toShort()) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -