Documentation
    Preparing search index...

    Function renderNappletHostBase

    • Render a host-page <base href="./">. A srcdoc napplet inherits the host page's base URL as document.baseURI; this base keeps the directory and drops the file name, query and fragment. Relative URLs that name a path resolve as before; fragment-only (#x) and query-only (?q) references on the host page resolve against the directory instead, so check the host page for them before adding it. Place it in the host page <head> before any relative URL.

      Returns string

      The base element HTML

      const head = `<head><meta charset="utf-8">${renderNappletHostBase()}</head>`;