Roadmap
v0.1: MVP
- Nitro spec + TypeScript API (
JSDOM.create,evaluate,serialize,dispose) - C++ structure (
HybridHtmlSandbox,LexborDocument,QuickJSRuntime,DOMBindings) - Lexbor integration: real HTML parsing and DOM queries
- QuickJS integration: real JS execution
- iOS support
- Android support
v0.2: Real DOM inside evaluate()
- Wire real Lexbor HTML parsing so
evaluate()sees a live DOM - Wire QuickJS JS execution so scripts run inside the sandbox
-
document.querySelector(sel)/document.querySelectorAll(sel)return real element objects insideevaluate() -
element.textContent/element.innerHTMLgetter and setter accessible insideevaluate() -
document.getAttribute(sel, attr)/document.setAttribute(sel, attr, val)insideevaluate() -
document.createElement/element.appendChild/element.removeChildinsideevaluate()
v0.3: Async & Events
-
addEventListener/removeEventListener -
setTimeout/setInterval/clearTimeout/clearInterval -
Promisesupport inside sandbox (microtask drain + uncaught rejection propagation) -
console.logforwarding to RN console viaonConsoleoption -
dispatchEvent(new Event('type'))dispatches to registered listeners -
evaluate()drains the event loop completely before returning
v0.4: Network & Storage
-
fetch(bridged through RN's network stack) -
localStorage/sessionStoragestubs -
XMLHttpRequeststub
v0.5: jsdom Compatibility
- Full jsdom API parity audit
-
window.location -
MutationObserver -
window.alert/window.confirm/window.prompt -
CustomEvent
v0.6: Node & Style API
Gaps identified by the v0.5 jsdom API parity audit, prioritized by how often real-world HTML/JS embedded scripts hit them.
- Generic Node traversal (
childNodes,nodeType,nodeName,nodeValue,firstChild/lastChild/nextSibling/previousSibling,parentNode) -
document.getElementsByClassName/document.getElementsByTagName -
element.cloneNode() -
element.dataset(mirrorsdata-*attributes) -
element.style(CSSStyleDeclaration-like object) -
document.title - Real event bubbling (
dispatchEventwalks ancestors;stopPropagation()/preventDefault()take effect)
v0.7: Node Identity & DOM Ergonomics
Gaps identified comparing against jsdom for real-world embedded scripts: stable node identity plus the traversal/mutation methods those scripts reach for most often. Layout-dependent APIs (
getComputedStyle,getBoundingClientRect, full CSSOM) are out of scope, since there's no rendering to back them.
- Stable node identity (
el.firstChild === el.firstChild) via a per-runtime wrapper cache -
node.contains(other) -
element.closest(selector) -
node.replaceChild(newChild, oldChild) -
node.before(...nodes)/after(...nodes)/replaceWith(...nodes) -
element.append(...nodes)/prepend(...nodes) -
element.insertAdjacentHTML(position, html)
v0.8: Attribute Enumeration & Node Comparison
-
document.createComment()/document.createDocumentFragment() -
element.getAttributeNames() -
element.attributes(snapshot array of{name, value}) -
element.toggleAttribute(name, force?) -
node.isSameNode(other)/node.isEqualNode(other)