Display multiple tabs side-by-side with experimental split view support
Split views are experimental in Firefox. There will be bugs and the API may change. This feature requires Firefox’s native split view support which is still under development.
Glide Browser provides access to Firefox’s experimental split view feature, allowing you to display multiple tabs side-by-side in a single window.
Before using split views, users must acknowledge the experimental nature by setting browser.tabs.splitview.hasUsed preference. Glide handles this automatically on first use.
const tab = await glide.tabs.active();if (glide.unstable.split_views.has_split_view(tab)) { console.log("Current tab is in a split view");} else { console.log("Current tab is standalone");}// Also works with tab IDif (glide.unstable.split_views.has_split_view(tab.id!)) { // Tab is in split view}
Revert a tab from a split view back to a normal tab:
// Separate by tab objectglide.unstable.split_views.separate(tab);// Separate by tab IDglide.unstable.split_views.separate(tabId);// Separate by split view ID (closes entire split view)glide.unstable.split_views.separate(splitViewId);
When you separate a tab from a split view, all tabs in that split view are reverted to normal tabs.
glide.keymaps.set("normal", "<leader>s", async () => { const tabs = await glide.tabs.query({}); // Need at least 2 tabs if (tabs.length < 2) { console.log("Need at least 2 tabs for split view"); return; } const currentTab = tabs.find(t => t.active); // Check if already in split view if (currentTab && glide.unstable.split_views.has_split_view(currentTab)) { // Separate current tab glide.unstable.split_views.separate(currentTab); } else { // Create split view with first two tabs glide.unstable.split_views.create([tabs[0], tabs[1]]); }});