views:

106

answers:

1

I want to Validate this toolbar item if there are more than 2 windows open. I know for tabs

event.target.disabled = event.target.browserWindow.tabs.length < 2;

works.

But

event.target.disabled = event.target.browserWindows.length < 2;

doesn't.

How can I validate so the toolbar item is enabled only if more than one window is opened.

A: 

Use safari.application.browserWindows.length instead.

Richard M