android: compat webviewexecutor to support arraybuffer

This commit is contained in:
pengfei.zhou
2021-12-31 16:55:38 +08:00
committed by osborn
parent c67803b717
commit 8c57e5e500
19 changed files with 381 additions and 177 deletions

View File

@@ -150,14 +150,12 @@ export class Image extends View {
return this.nativeChannel(context, "getImagePixels")()
}
toModel() {
toModel(): NativeViewModel {
const ret = super.toModel()
if (Environment.platform === 'iOS') {
if (Reflect.has(ret.props, "imagePixels")) {
const imagePixels = Reflect.get(ret.props, "imagePixels")
const pixels = imagePixels.pixels
imagePixels.pixels = this.callback2Id(() => pixels)
}
if (Reflect.has(ret.props, "imagePixels")) {
const imagePixels = Reflect.get(ret.props, "imagePixels")
const pixels = imagePixels.pixels
imagePixels.pixels = this.callback2Id(() => pixels)
}
return ret
}