Skip to content

WebView communication may be slow on mobile #2910

@FrederikBolding

Description

@FrederikBolding

// To prevent XSS, we base64 encode the message before injecting it.
// This adds significant performance overhead.
// TODO: Should we use mobile native base64 here?
const bytes = stringToBytes(json);
const base64 = bytesToBase64(bytes);
this.#webView.injectJavaScript(`window.postMessage('${base64}')`);

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions