Page made by JavaScript


No book can ever be finished. While working on it we learn just enough to find it immature the moment we turn away from it.

— Karl Popper, preface to the second editon of The Open Society and Its Enemies, 1950


Sample code
function makePage() {
//<p>— <b>AUTH</b>DESC<i>BOOK</i>YEAR</p>
  let para = elt("p", "— ",
        elt("b", AUTH), DESC,
        elt("i", BOOK), YEAR
      ) 
  let span = elt("span", TEXT)
  span.style.color = "blue"
  let bold = elt("b", "Sample code")
  let pre  = elt("pre", makePage)
  let link = elt("a", "Creating nodes")
  link.href = BOOK_REF
  document.title = TITLE
  document.body = elt("body", 
      elt("h2", TITLE), 
      elt("hr"), 
      elt("blockquote", span, para), 
      elt("hr"), 
      elt("div", bold, pre), 
      elt("div", "Ref: ", link),
      elt("hr")
    )
  document.body.style.maxWidth = "420px"
}
Ref: Creating nodes

+ BODY
 + H2 Page made by JavaScript
 + HR
 + BLOCKQUOTE
  + SPAN No book can ever be …
  + P —
   + B Karl Popper
   + I The Open Society and…
 + HR
 + DIV
  + B Sample code
  + PRE function makePage() …
 + DIV Ref:
  + A Creating nodes
 + HR