I am making an application in Flutter. My application will have a WebView through which sites can be opened. As you know, in WebView you can embed your own Js code. Let's say I open facebook.com and it has the following html code:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<script async="async" src="https://www.site-one.com/js.js"></script>
<script async="async" src="https://www.site-two.com/js.js"></script>
<script async="async" src="https://www.site-three.com/js.js"></script>
</head>
<body>
..
</body>
</html>
I need to determine if the site has a script download from site-two.com. If such a site is present, then we block the download of the script from site-two.com, and the site facebook.com itself continues to work only without this script.