RTO_DOM_actions.js
Helper file documentation for
RTO_DOM_actions.js.Docs updated: 2026-03-24
Summary
Button-driven read/write/highlight/close actions.
- Exports:
(none)— auto-binds onDOMContentLoaded - Depends on:
RTO_form_api.js(and typicallyRTO_connector.jssettingwindow.RTOconnected)
What it is
A button-driven helper for simple remote DOM workflows: read remote HTML into a local textarea, write it back, highlight a remote element, and close the controlled tab.
Download
Download RTO_DOM_actions.jsData attributes
data-rto-action:read-block|write-block|highlight|close-tabdata-rto-tabKey(recommended) — tabKey of the controlled tabdata-rto-tabkey(legacy alias) — accepted toodata-rto-selector: remote selector (in the controlled tab)data-rto-target: local selector (textarea) for read/writedata-rto-color: highlight color (optional)data-rto-ms: highlight duration in ms (optional)data-rto-dirtyordata-rto-mark-dirtyon a textarea: marks it dirty on input (optional)
Example
<textarea id="localHtml" data-rto-dirty="1" style="width:100%;height:160px"></textarea>
<button data-rto-action="read-block" data-rto-tabKey="app" data-rto-selector="#content" data-rto-target="#localHtml">
Read remote HTML
</button>
<button data-rto-action="write-block" data-rto-tabKey="app" data-rto-selector="#content" data-rto-target="#localHtml">
Write remote HTML
</button>
<button data-rto-action="highlight" data-rto-tabKey="app" data-rto-selector="#content" data-rto-color="#ffeb3b" data-rto-ms="1200">
Highlight
</button>
<button data-rto-action="close-tab" data-rto-tabKey="app">
Close tab
</button>
<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_connector.js"></script>
<script src="../RTO_helpers/RTO_DOM_actions.js"></script>