Highlight WKWebView Text

34 Views Asked by At

I'm trying to highlight occurrences of strings in a WKWebView (UIKit, Swift 5).

Is there any native way to do this? If not, how should I go about doing this?

I have tried evaluating JS but the solution requires jquery and a library "rangy" https://longvudai.medium.com/highlight-text-in-wkwebview-1659a19715e6 which I want to avoid for performance reasons.

0

There are 0 best solutions below