In-page tabs and split view
Records as tabs inside the instance, split panes by dragging, and the rules that keep it from breaking navigation.
Off by default. Turn it on with /tabs. Turning it off takes effect immediately in every open
frame; turning it on needs a reload, because a page that never had it has nothing listening.
What it does
Classic .do pages you open inside the instance become tabs in a bar under the main navigation,
instead of replacing what you were looking at. The first tab is ServiceNow's own frame. It is not
ours, so it cannot be moved or closed.
Three tabs keep a live frame at a time. The rest are remembered and remounted when you come back to them. That number is a setting, and raising it is paid on your instance rather than in your browser: every live frame is a page the instance keeps serving.
A tab with unsaved changes is never unmounted. Remounting rebuilds the page from its address, which would silently drop what you typed, and writing the values back into a ServiceNow form is not safe either: the form keeps its own model, and a form that only looks like it holds your work is worse than one that lost it. So such a tab stays live past the limit, and an orange dot on it, with a tooltip, says why it is still there.
Which clicks are hosted
A plain click on a hostable link opens it in a new in-page tab. Ctrl+click (Cmd+click on a
Mac) and the middle button open a real browser tab instead, as they do anywhere else on the web,
and Shift+click opens a new window. From the command palette, add -it to a command to send its
page to an in-page tab (see list switches).
Only classic .do pages on the same origin. The /now/ workspace routes are excluded;
javascript:, mailto:, tel:, blob:, data: and in-page anchors are not navigations at all;
and a protocol-relative link is always refused.
One rule does not move: a click that cannot be hosted is never blocked. A click that is misjudged and passes through leaves ServiceNow exactly as it found it. A click that is wrongly blocked breaks navigation, and looks like the extension broke the platform.
Split view
Drag a tab to the edge of a pane to split there, or to the centre to join that pane. The proportion is the one VS Code uses: within a tenth of a side, it splits.
Two implementation facts explain behaviour you would otherwise find strange.
The frames never move in the DOM. Moving an iframe reloads it, which would throw away a half-filled form every time you split or dragged. The panes are empty shapes that take no pointer events, and the frames sit above them copying the rectangles.
Dragging uses pointer events rather than the browser's own drag and drop, because a pointer leaving the bar over an iframe stops delivering events to the top document. The pointer is captured instead, so the drag survives crossing a frame.
Per-tab actions
Reload reloads the frame's own current address rather than reassigning it, so wherever you navigated inside the tab survives. If the frame cannot be read, for example during a redirect to an identity provider, it falls back to the address the tab was opened with.
Zoom is applied to the document inside the frame, not as a transform on the frame, so text reflows instead of being scaled. Ctrl or Cmd with the wheel over a tab in the bar steps the zoom, and the bar is the only place that gesture can exist: a wheel inside an iframe never reaches the document above it.
Where the bar sits
Below ServiceNow's main navigation, mounted on the document element, with a deliberately tiny stack order so the platform's own menus stay above it. The order is written inline as well as in the stylesheet, because another extension's global rule once pushed the bar over the navigation flyouts.
When the first tab is active, ServiceNow's own frame is shortened by the height of the bar rather than the page body being moved, which is what keeps the platform's layout intact.
Tab labels are set as text, never as markup: a record name is somebody else's data.
