jarek-foksa / xel

Xel - Widget toolkit for building native-like Electron and Web apps
https://xel-toolkit.org
Other
679 stars 58 forks source link

Add x-doctabs.switchTab(tab) #71

Closed WetDesertRock closed 6 years ago

WetDesertRock commented 6 years ago

This is the same as PR #70, but I modified it to avoid the anti-pattern you described.

I also renamedd this PR to better fit what I was aiming to do. I needed a way to switch the tab, (for instance, after creating a tab it is useful to switch to it).

jarek-foksa commented 6 years ago

Thanks! I'm not sure about it, but I might change this API a bit in future to make it consistent with e.g. <x-buttons>.