RTO_connector.js

Helper file documentation for RTO_connector.js.
Docs updated: 2026-03-24

Summary

Connection helper: detect + global flag + stable request API.

  • Exports: RTOconnectOnce, RTOconnected, RTOConnector.request()
  • Depends on: RTO_form_api.js

What it is

Detects the extension (via RTOForm.detect()) and sets window.RTOconnected. Also exposes a stable call wrapper: window.RTOConnector.request({ "action": "...", ... }).

Friendly actions: open, focus, close (mapped to openTab, focusTab, closeTab).

Download

Download RTO_connector.js

Example

<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_connector.js"></script>
<script>
  RTOconnectOnce(1500).then(function(ok){
    console.log("connected?", ok, "flag:", window.RTOconnected);

    if(!ok) return;

    RTOConnector.request({
      action: "open",
      tabKey: "demo",
      url: "https://example.com",
      focus: true,
      newTab: true
    }).then(function(res){
      console.log("openTab result:", res);
    });
  });
</script>

Next