On this page
Overview
Renders complete Markdown with Marked and exposes the complete rendered markup.
- Artifact
MD.js· esm - Classification
public first party - Availability
Browser / native WebView - Normalization
Complete raw and rendered Marked values; parse errors remain vendor-native.
Import and lifecycle
import md from '/arcane/modules/MD.js';
Import applies Arcane Marked options to the shared vendored singleton. Construction, raw assignment, and append() reparse complete Markdown; safeRendered returns the same complete rendered markup.
Application-facing behavior: default MD; raw, rendered, safeRendered, append().
Protocol and host implementation
Marked This detail does not widen the application-facing API or grant authority.
Exports, signatures, parameters, and results
| Binding | Form | Declaration or signature | Parameter syntax |
|---|---|---|---|
default | default · class | class MD | — |
| Callable | Kind | Exact public signature | Parameter syntax |
|---|---|---|---|
MD.append | public-member | append(value='') | value='' |
| Member | Kind | Exact public declaration | Parameter syntax |
|---|---|---|---|
MD.constructor | constructor | constructor(raw='') | raw='' |
MD.rendered | get | get rendered() | — |
MD.safeRendered | get | get safeRendered() | — |
MD.rendered | set | set rendered(value='') | value='' |
MD.raw | get | get raw() | — |
MD.raw | set | set raw(value='') | value='' |
MD.append | method | append(value='') | value='' |
Parameter meanings and results
new MD(raw); raw getter/setter; rendered getter with intentionally no-op setter; safeRendered returns rendered without stripping markup; append(string) returns the updated complete raw Markdown.
Events, side effects, and errors
Source-literal CustomEvent dispatches
No source-literal CustomEvent dispatch is part of this artifact.
Lifecycle and event flow
This artifact has no additional documented lifecycle event flow.
Direct coded failures
This artifact directly assigns no stable coded failure.
Exported Error subclasses
This artifact exports no Error subclass.
Documented failure behavior
- Marked parse or DOM exceptions can propagate.
- Non-string raw/append input is contained with console.trace and leaves state unchanged.
Availability and capabilities
Browser / native WebView. Complete raw and rendered Marked values; parse errors remain vendor-native.
None; safeRendered requires browser/native-WebView DOM.
Contract example
import MD from '/arcane/modules/MD.js';
const md = new MD('# Ready\n<script>alert(1)</script>');
document.querySelector('main').innerHTML = md.safeRendered;
Related reference
No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.