demos/epcp/browser-webworkers-demo/src/index.js
/**
 * Render a message showing off pubcontrol.
 * Show it wherever the html has opted into replacement.
 */
Render a message showing off pubcontrol.
Show it wherever the html has opted into replacement.
Render a message showing off pubcontrol . Show it wherever the html has opted into replacement .
function render({ document }) {
  console.debug("rendering");
  document.querySelectorAll(".replace-with-pubcontrol").forEach(el => {
    el.innerHTML = `
    <div>
      <h2>pubcontrol default export</h2>
      <pre>${JSON.stringify(objectSchema(Publisher), null, 2)}</pre>
    </div>
    `;
  });
}
function render ( { document } ) { console . debug ( "rendering" ) ; document . querySelectorAll ( ".replace-with-pubcontrol" ) . forEach ( el => { el . innerHTML = ` ${ JSON . stringify ( objectSchema ( Publisher ) , null , 2 ) } ` ; } ) ; }
Render a message showing off pubcontrol.
Render a message showing off pubcontrol .