You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to get favicon image in SafariScripting in safari.swift file #21
There is no way to directly query for the favicon using the Safari scripting interface. You could conceivably retrieve the document from the Safari window and parse the link tags to find the url for the favicon. You could also use a service such as https://favicons.githubusercontent.com to retrieve the favicon for the domain associated with a given tab.
Activity
jis247 commentedon Oct 1, 2020
I have used this to get current tab name and url but how to get current tab FavIcon image.
tingraldi commentedon May 20, 2021
There is no way to directly query for the favicon using the Safari scripting interface. You could conceivably retrieve the document from the Safari window and parse the link tags to find the url for the favicon. You could also use a service such as https://favicons.githubusercontent.com to retrieve the favicon for the domain associated with a given tab.