RTO_DOM_actions.js

Helper file documentation for RTO_DOM_actions.js.
Docs updated: 2025-12-17

Summary

Button-driven read/write/highlight/close actions.

  • Exports: (none) — auto-binds on DOMContentLoaded
  • Depends on: RTO_form_api.js
  • Uses data attributes: data-rto-action, data-rto-color, data-rto-key, data-rto-mark-dirty, data-rto-ms, data-rto-selector, data-rto-tabKey, data-rto-tabkey, data-rto-target

What it is

A button-driven helper for simple remote DOM workflows: read HTML into a local textarea, write it back, highlight, and close tab.

Download

Download RTO_DOM_actions.js

Data attributes

  • data-rto-action: read-block | write-block | highlight | close-tab
  • data-rto-tabKey (recommended)
  • data-rto-selector: selector in the remote tab
  • data-rto-target: selector of local textarea (read/write)

Example

<textarea id="localHtml" data-rto-mark-dirty="1"></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>

<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_DOM_actions.js"></script>

Next