Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript Interop for the Embedded WebView #500

Closed
xulihang opened this issue Oct 9, 2023 · 1 comment
Closed

JavaScript Interop for the Embedded WebView #500

xulihang opened this issue Oct 9, 2023 · 1 comment

Comments

@xulihang
Copy link
Owner

xulihang commented Oct 9, 2023

We can call a JavaScript function in a web page from ImageTrans so that we can perform a lookup without refreshing the page.

The web page has to have the following functions:

function supportJSInterop(){
  return true;
}

function updateSource(source) {
  doYourWork(source);
}

A working example:

hanzi2pinyin	https://www.basiccat.org/hanzi2pinyin/?text={source}
@xulihang
Copy link
Owner Author

xulihang commented Oct 9, 2023

Added in v2.5.3.

@xulihang xulihang closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant