Skip to content
Snippets Groups Projects
Commit 2511d2bc authored by Arkerthan's avatar Arkerthan
Browse files

add App.UI.DOM.includeDOM

parent 0cff90cc
No related branches found
No related tags found
No related merge requests found
......@@ -247,6 +247,18 @@ App.UI.DOM.colorInput = function(defaultValue, onEnter) {
return input;
};
/**
* @param {Node} node
* @param {string} uniqueID - should be unique in the whole passage
* @param {string} [tag]
* @returns {string}
*/
App.UI.DOM.includeDOM = function(node, uniqueID, tag = "span") {
$(document).one(':passagedisplay', () => { $(`#inclDOM${uniqueID}`).append(node); });
return `<${tag} id='inclDOM${uniqueID}'></${tag}>`;
};
/**
* @param {string} text
* @returns {HTMLElement}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment