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