Capability first · transport second

MD.js

Renders complete Markdown with Marked and exposes the complete rendered markup.

SDK 0.5.18Runtime 0.8.12Protocol arcane/1
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

JavaScript
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

BindingFormDeclaration or signatureParameter syntax
defaultdefault · classclass MD
CallableKindExact public signatureParameter syntax
MD.appendpublic-memberappend(value='')value=''
MemberKindExact public declarationParameter syntax
MD.constructorconstructorconstructor(raw='')raw=''
MD.renderedgetget rendered()
MD.safeRenderedgetget safeRendered()
MD.renderedsetset rendered(value='')value=''
MD.rawgetget raw()
MD.rawsetset raw(value='')value=''
MD.appendmethodappend(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

JavaScript
import MD from '/arcane/modules/MD.js';

const md = new MD('# Ready\n<script>alert(1)</script>');
document.querySelector('main').innerHTML = md.safeRendered;

No direct Core call is claimed for this artifact. Any injected provider or consuming module retains its own documented authority.