ooRexx in a web page

The real ooRexx interpreter, compiled to WebAssembly, runs the <script type="text/rexx"> elements of this page.

1. A script sets the page's text

Loading ooRexx…

2. Rexx handles the page's events

No clicks yet.

The handler is a method of a Rexx object, in app.rex.

3. JavaScript calls Rexx

The page's own JavaScript calls the routine Evaluate, which a Rexx script below defines.

How

<script src="ooRexx.js"></script>
<script type="text/rexx">
  .js~page~document~getElementById("greeting")~textContent = "Hello from Rexx"
</script>
<script type="text/rexx" src="app.rex"></script>

The scripts run in order, once the page is loaded, and see what the scripts before them defined. SAY writes to the browser's console. View this page's source for the rest.