inlined method used only once
This commit is contained in:
parent
e18ffa8779
commit
644ae56f4f
1 changed files with 5 additions and 10 deletions
15
js/reveal.js
15
js/reveal.js
|
@ -230,21 +230,16 @@ var Reveal = (function(){
|
||||||
function createSingletonNode(container, tagname, classname, innerHTML){
|
function createSingletonNode(container, tagname, classname, innerHTML){
|
||||||
var node = container.querySelector('.' + classname);
|
var node = container.querySelector('.' + classname);
|
||||||
if( !node ){
|
if( !node ){
|
||||||
node = buildNode(tagname, classname, innerHTML);
|
node = document.createElement(tagname);
|
||||||
|
node.classList.add(classname);
|
||||||
|
if(innerHTML !== null){
|
||||||
|
node.innerHTML = innerHTML;
|
||||||
|
}
|
||||||
container.appendChild(node);
|
container.appendChild(node);
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildNode(tagname, classname, innerHTML){
|
|
||||||
var node = document.createElement(tagname);
|
|
||||||
node.classList.add(classname);
|
|
||||||
if(innerHTML !== null){
|
|
||||||
node.innerHTML = innerHTML;
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the slide background elements and appends them
|
* Creates the slide background elements and appends them
|
||||||
* to the background container. One element is created per
|
* to the background container. One element is created per
|
||||||
|
|
Loading…
Reference in a new issue