Thank you for your reply. I was thinking about a Safari Web Extension, but to be honest the important thing is to know that is possible to achieve this result normally restricted to normal Javascript on web pages or an external sandboxed app.
At the same time, seems that an App Extension has more capabilities and it could be included directly in the primary app without downloading it separately. But in this case I find more difficulties in discovering how to achieve this result. What I found on a web search is deprecated: https://developer.apple.com/documentation/safariextensions/safaribrowserwindow
Topic:
App & System Services
SubTopic:
Core OS
Tags: