开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜