Open a URL in a new window/active tab

2.2k Views Asked by At

I know how to open a window in a new tab:

var newTab = safari.application.activeBrowserWindow.activeTab();
newTab.url = "http://something"

I know how to create a new window: safari.application.openBrowserWindow();

How do I open a URL in the newly created window? Or how do I open a URL in the activeBrowerWindow's active tab?

1

There are 1 best solutions below

0
On
var nwin = safari.application.openBrowserWindow();
nwin.activeTab.url = "http://www.example.com";