How to use store data in content.js file.

I have implement reset text function in content.js file with static array. I need to manage this array with dynamic.

  1. I have pass data app to extension with FileManager.
  2. I have get store data in extension safariwebextension.swift. file.

How can use this array in content.js file. Need to replace store data in content.js file.

Your provided demo only supported mac version feature.

Replies

If you need to communicate between your extension's JavaScript and the safariwebextension.swift file - you should be able to use the nativeMessaging API.

https://developer.apple.com/documentation/safariservices/safari_web_extensions/messaging_between_the_app_and_javascript_in_a_safari_web_extension?language=objc has some examples on how this can work.

Hope this helps!