MCPcopy Create free account
hub / github.com/cyclejs/cyclejs / makeHTMLDriver

Function makeHTMLDriver

dom/src/makeHTMLDriver.ts:36–50  ·  view source on GitHub ↗
(effect: EffectCallback, options?: HTMLDriverOptions)

Source from the content-addressed store, hash-verified

34const noop = () => {};
35
36export function makeHTMLDriver(effect: EffectCallback, options?: HTMLDriverOptions) {
37 if (!options) { options = {}; }
38 const modules = options.modules || defaultModules;
39 const toHTML = init(modules);
40 function htmlDriver(vnode$: Stream<VNode>, name: string): DOMSource {
41 const html$ = vnode$.map(toHTML);
42 html$.addListener({
43 next: effect || noop,
44 error: noop,
45 complete: noop,
46 });
47 return new HTMLSource(html$, name);
48 };
49 return htmlDriver;
50}

Callers 2

server.jsFile · 0.90
html-render.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected