Every line of 'javascript addattribute' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
22 function addAttribute(attribute, value) { 23 var attributes = filterUrl.getQueryVar(attribute); 24 if (!attributes) { 25 attributes = value; 26 } else { 27 if (attributes.indexOf(value) == -1) { 28 attributes += ',' + value; 29 } 30 } 31 filterUrl = filterUrl.addQueryVar(attribute, attributes); 32 return filterUrl; 33 }