Sunookitsune
Sunookitsune

Reputation: 337

Safari Extension Popover Links

Is it possible to have a link work in a Safari popover? I've done just about everything I can think of, but it appears that the adding links to popovers only changes the appearance, and doesn't result in anything clickable, either with href or onclick.

Upvotes: 6

Views: 1237

Answers (2)

Dmitriy
Dmitriy

Reputation: 399

You can add onclick listener on href or div

.onclick = safari.application.activeBrowserWindow.openTab().url = "http://www.yourdomain.com/";

Upvotes: 7

goodhyun
goodhyun

Reputation: 5002

var link = document.querySelector('#~~~');
link.addEventListener("click", function(event) {
    safari.application.activeBrowserWindow.openTab().url = "http://~~"
})

Upvotes: 0

Related Questions