Safari 5 Extension Validating Event
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.len开发者_运维百科gth < 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.
Use safari.application.browserWindows.length
instead.
精彩评论