pixel-editor/_ext/scripts/utilities/getSetText.js
Leamsi Escribano ec9dbee493 Util changes
2021-06-28 19:54:54 -04:00

10 lines
352 B
JavaScript

//get text of specified element
function getText(elementId) {
var element = (typeof elementId == 'string' ? document.getElementById(elementId) : elementId);
return element.textContent;
}
function setText(elementId, text) {
var element = (typeof elementId == 'string' ? document.getElementById(elementId) : elementId);
element.textContent = text;
}