html - change innertext without affecting dom elements in Javascript (not jquery) -


i need inside firefox extension, not using jquery, here code:

var label = document.createelementns(xul_ns, "label"); // create new xul label   label.setattribute("value", actionlabel);   label.setattribute("class", "label-title");   var description = document.createelementns(xul_ns, "description");    description.setattribute("id", actionid);   description.appendchild(label);   description.innerhtml=actiontext; 

output should be:

<description id=actionid> <label class="label-title" value=actionlabel/> long section of text word wrap when displayed. </description> 

this did job:

description.insertbefore(label,description.firstchild);


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -