| 91 | var my_indent = dont_indent ? "" : indent; |
| 92 | |
| 93 | var disclosure = function(open, placeholder, close, type, builder) { |
| 94 | var content; |
| 95 | var empty = span(type); |
| 96 | var show = function() { if (!content) append(empty.parentNode, |
| 97 | content = prepend(builder(), |
| 98 | A(renderjson.hide, "disclosure", |
| 99 | function() { content.style.display="none"; |
| 100 | empty.style.display="inline"; } ))); |
| 101 | content.style.display="inline"; |
| 102 | empty.style.display="none"; }; |
| 103 | append(empty, |
| 104 | A(renderjson.show, "disclosure", show), |
| 105 | themetext(type+ " syntax", open), |
| 106 | A(placeholder, null, show), |
| 107 | themetext(type+ " syntax", close)); |
| 108 | |
| 109 | var el = append(span(), text(my_indent.slice(0,-1)), empty); |
| 110 | if (show_level > 0) |
| 111 | show(); |
| 112 | return el; |
| 113 | }; |
| 114 | |
| 115 | if (json === null) return themetext(null, my_indent, "keyword", "null"); |
| 116 | if (json === void 0) return themetext(null, my_indent, "keyword", "undefined"); |