1
1
mirror of https://github.com/github/semantic.git synced 2024-11-25 11:04:00 +03:00

Add a function to wrap a node in another node.

This commit is contained in:
Rob Rix 2015-10-13 11:10:54 -04:00
parent 0dcecb9a00
commit 208238ae6e

View File

@ -28,6 +28,12 @@
request.send(null);
}
function wrap(tagName, element) {
var node = document.createElement(tagName);
node.appendChild(element);
return node;
}
function toDOM(json) {
var node = document.createElement("div");
if (json instanceof Array) {