Block bad window.fetch() messages using the Rust engine (original) (raw)

Description:

Block certain window.fetch() api calls by connecting to the rust engine asynchronously using apples built in javascript to swift mechanism WKUserContentController

Additional Information

Test plan

  1. You may test by building the debug version of the application and seeing if no javascript errors are thrown on the injected scripts.
  2. Go to a few sites with known trackers and test that nothing is broken. (YouTube, Facebook, instagram, etc)

Test 2:

  1. Switch languages to something that uses regional lists. (ex switch phone to the polish)
  2. Go to twitter and make sure the login works

Test 3:

  1. Go to https://openocean.finance/ and make sure the page loads (should ideally run the application on debug mode to ensure no asserts are triggered)