Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addFeature: function (name, params){
if(!name) return;
var el = new et.Element('feature');
el.attrib.name = name;
if (params) {
params.forEach(function(param){
var p = new et.Element('param');
p.attrib.name = param.name;
p.attrib.value = param.value;
el.append(p);
});
}
this.doc.getroot().append(el);
},
function findOrCreate (doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
doc.getroot().append(ret);
}
return ret;
}
function findOrCreate (doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
doc.getroot().append(ret);
}
return ret;
}
function findOrCreate (doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
doc.getroot().append(ret);
}
return ret;
}
function findOrCreate (doc, name) {
var ret = doc.find(name);
if (!ret) {
ret = new et.Element(name);
doc.getroot().append(ret);
}
return ret;
}