草庐IT

otherWindow

全部标签

javascript - IE 10 + KnockoutJS = HierarchyRequestError?

我已经尽可能地简化了我的问题。它仅发生在InternetExplorer中(已确认9和10)。我有一个用这个呈现的页面:window.initChild=function(ko,viewModel){window.ko=ko;ko.applyBindings(viewModel,document.body);}我的SPA电话varotherWindow=window.open('myurl','_blank');varhandler=function(){otherWindow.initChild(ko,report);};if(otherWindow.addEventListener

user-interface - 隐藏窗口删除所有内容后显示

我正在使用以下代码生成一个带有按钮的主窗口来打开其他窗口。我希望能够反复隐藏和显示其他窗口。关闭主窗口应该退出程序:packagemainimport("github.com/andlabs/ui")funcmain(){ui.Main(makeAllWins)}varmainWindow*ui.WindowvarotherWindow*ui.WindowfuncmakeAllWins(){makeMainWin()makeOtherWin()mainWindow.Show()}funcmakeMainWin(){varotherButton=ui.NewButton("Othermo