📄️ Javascript Injection
You can inject JavaScript code in different ways:
📄️ Javascript WebView Communication
You can communicate with JavaScript and vice-versa. There 3 ways to communicate with JavaScript:
📄️ Javascript User Scripts
What is a User Script? We can say that the UserScript class is the equivalent of the WKUserScript iOS native class. It represents a JavaScript code that the WebView injects into the web page and in any other subsequent navigated web page.
📄️ Javascript Content Worlds
Starting from iOS 14.0+, WebKit introduces the concept of WKContentWorld, which is an object that defines a scope of execution for JavaScript code, and which you use to prevent conflicts between different scripts.