mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
Arrays add <ol> elements.
This commit is contained in:
parent
208238ae6e
commit
69568fb622
@ -35,12 +35,14 @@
|
||||
}
|
||||
|
||||
function toDOM(json) {
|
||||
var node = document.createElement("div");
|
||||
var node;
|
||||
if (json instanceof Array) {
|
||||
node = document.createElement("ol");
|
||||
for (index in json) {
|
||||
node.appendChild(toDOM(json[index]));
|
||||
}
|
||||
} else if (json instanceof Object) {
|
||||
node = document.createElement("div");
|
||||
if (json['source'] != null) {
|
||||
node.textContent = json['source'];
|
||||
} else if (json['insert'] != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user