检查extjs应用程序是否已在Chrome标签中打开

时间:2019-01-23 19:23:00

标签: google-chrome extjs6

上下文:具有菜单按钮的应用程序A触发事件,该事件会在chrome标签上打开另一个应用程序(应用程序B)。

我需要检查应用程序B是否已经打开:

如果不是::加载应用程序B

如果是:重新加载应用程序B

说明代码:

Ext.create('Ext.Container', {
 renderTo: Ext.getBody(),
 items : [{
        xtype: 'button',
        text : 'Button',
        handler: function(){
            //dummy code
            //get chrome win reference missing ????

            var win ;
            if(!win){
               window.open('https://www.sencha.com/');  
            }else{
               window.focus();
               window.location.reload();
            }
        }
     }
  ]
});

字段:https://fiddle.sencha.com/#view/editor&fiddle/2p8v

0 个答案:

没有答案
相关问题