inlined method used only once

This commit is contained in:
Guillaume Turri 2013-08-11 16:30:08 +02:00
parent e18ffa8779
commit 644ae56f4f
1 changed files with 5 additions and 10 deletions

View File

@ -230,18 +230,13 @@ var Reveal = (function(){
function createSingletonNode(container, tagname, classname, innerHTML){
var node = container.querySelector('.' + classname);
if( !node ){
node = buildNode(tagname, classname, innerHTML);
container.appendChild(node);
}
return node;
}
function buildNode(tagname, classname, innerHTML){
var node = document.createElement(tagname);
node = document.createElement(tagname);
node.classList.add(classname);
if(innerHTML !== null){
node.innerHTML = innerHTML;
}
container.appendChild(node);
}
return node;
}