Remote Tab Opener — Developer Documentation

Beginner-friendly docs for v7.11.4
Docs updated: 2025-12-17

What is Remote Tab Opener?

Remote Tab Opener (RTO) lets a web page (your app) communicate with the RTO browser extension to open/navigate/focus tabs and to run safe DOM actions inside a controlled tab.

Important safety idea
RTO is deny-by-default. A host must be explicitly allow-listed before the extension will control it.

Quickstart (copy/paste)

This is the smallest example that detects the extension, opens a tab, waits for a selector, then reads text:

<!-- 1) Load the core helper -->
<script src="../RTO_helpers/RTO_form_api.js"></script>

<script>
(async function(){
  const tabKey = "demoTab";
  try {
    // 1) Detect the extension
    await RTOForm.detect(1500);

    // 2) Open (or reuse) a controlled tab
    await RTOForm.openTab(
      { tabKey, url: "https://example.com", focus: true},
      { timeoutMs: 15000 }
    );

    // 3) Wait for a selector, then read text
    await RTOForm.waitForSelector({ tabKey, selector: "h1" }, { timeoutMs: 8000 });
    const data = await RTOForm.getText({ tabKey, selector: "h1" }, { timeoutMs: 8000 });

    console.log("h1 text:", data.text || data.value || data);
  } catch (err) {
    console.error("RTO error:", err);
  }
})();
</script>

Optional: show a status banner

If you are just starting, the status banner makes setup much easier (detect + allow-list button):

<!-- Optional: a beginner-friendly status banner -->
<div id="rtoStatus"></div>

<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_domainList.js"></script>
<script src="../RTO_helpers/RTO_status_ui.js"></script>
<script>
  RTOStatusUI.mount({ containerId: "rtoStatus" });
</script>

Core concepts

  • tabKey: a string identifier for the controlled tab (example: "billingTab"). You choose it.
  • Allow-list: the extension only works on hosts the user allowed.
  • Controlled tab: the extension can only run DOM actions inside a tab it controls (opened/adopted by RTO).
  • Timeouts: every request has a timeout. Use waitForSelector for dynamic pages.

Downloads

Get the helper pack (recommended):

Download helpers ZIP
Or go to the Downloads page for individual files and load order.

Helper files (JS)

Each helper file is documented in Helpers and is also downloadable directly:

File What it does Download
RTO_form_api.js Core API wrapper (recommended for all projects). Download
RTO_detector.js Small helper to detect the extension once. Download
RTO_connector.js Detect + set a global connection flag for UI helpers. Download
RTO_tabsList.js Normalized listTabs snapshot utilities. Download
RTO_openTab_button.js Bind buttons to open/navigate/focus a remote tab. Download
RTO_openTabsListing.js Fill a <tbody> with currently controlled tabs. Download
RTO_visible_when_tab.js Show/hide elements depending on whether a tabKey is open. Download
RTO_domainList.js Allow-list API wrapper. Download
RTO_addRemoveDomain.js Allow-list UI binder. Download
RTO_favoritesList.js Favorites API wrapper. Download
RTO_addRemovefavorite.js Favorites UI binder. Download
RTO_DOM_focus.js Focus a selector inside a controlled tab. Download
RTO_DOM_highlight.js Highlight a selector inside a controlled tab. Download
RTO_DOM_style.js Apply inline styles to a selector inside a controlled tab. Download
RTO_DOM_actions.js Button-driven read/write/highlight/close actions. Download
RTO_status_ui.js Beginner-friendly status banner (detect + allow-list). Download

Next