Interpretive mode is not intended primarily as a distribution platform!
Nevertheless, Triv's Web Workshop is distributed as an application entirely implemented with interpretive mode, and including support for reconciled mode.
Browser support for interpretive mode varies!
Interpretive mode is an operating mode of the Javascript implementation of Triv.
A more limited, reconciled mode, is engaged when a browser has no support.
The correctness of a document not verified for reconciled mode is not guaranteed.
* and other WebKit-based browsers
(Including as text content, the toggle for single-line comment syntax, etc.)
The only major limitation of interpretive mode is:
Any text formatted like a native script element to the browser should be avoided.
(Even in a literal or comment!)
Any script intended to run should only be included with element statement syntax.
(i.e. Not <script>
, but script:
)
During loading of interpretive mode, a re-request of the document is performed to retrieve the source code unmodified by browser rendering. The re-request is expected to complete.
Otherwise, the program attempts reconciled mode.
The major limitation of reconciled mode is that the browser's version of the
Spacing around angle brackets seems to determine whether the character is transformed into a character reference or is retained as a portion of an element.
Reconciled mode attempts to reconcile common changes made on-the-fly by the browser, by transforming
every &
/ <
/ >
to &
/ <
/ >
before compiling.
Specific limitations to keep in mind:
(The browser seems to always remove </>
)
</script>
interrupts any inline scripts(Even in a script literal or script comment!)
The browser's standards compliance rendering mode is possible with interpretive mode.
A document intended for interpretive mode:
<script>"interpretive"</script>
<script src="https://triv.co/3v.js"></script>
api-version=0.50.0
===
p: The rest of the document...
Include a doctype, i.e. <!doctype html>
, with the browser instruction for standards compliance.
Include a styling element after declaring but before invoking interpretive mode.
<script>"interpretive"</script>
<style>body {display: none}</style>
<script src="https://triv.co/3v.js"></script>
The latest release is always available at:
https://triv.co/3v.js
If the implementation reaches 1.0
without support for previous API versions,
the current version series (0.x.x
) will stay available at:
https://triv.co/3v-0.js
Minified versions are available: https://triv.co/3v.min.js