From 5347b50ad37d72d102e32fc32aea7692f4e4150d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Wed, 21 Oct 2015 16:34:20 -0400 Subject: [PATCH] Construct keyed nodes as a definition list. --- prototype/UI/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/prototype/UI/index.html b/prototype/UI/index.html index 64530d4cf..0644c223f 100644 --- a/prototype/UI/index.html +++ b/prototype/UI/index.html @@ -99,6 +99,17 @@ return element; } + if (model.syntax instanceof Keyed) { + var element = document.createElement("dl"); + for (k in model.syntax) { + var dt = document.createElement("dt"); + dt.textContent = k; + element.appendChild(dt); + element.appendChild(wrap("dd", toDOM(model.syntax[k]))); + } + return element; + } + if (model.syntax instanceof Leaf) { var element = document.createElement("span"); // ?