All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javascript.elementKeysAndAttributes.js Maven / Gradle / Ivy

The newest version!
const element = arguments[0];
var attrib, textValue, result = [];

for(var k in element){
	let t = typeof element[k];
	if(t == 'number' || t == 'boolean' || t == 'string'){
		result.push(k);
	}
}

Array.prototype.slice.call(element.attributes).forEach(function(attrib) {
	if(result.indexOf(attrib.name) == -1){
		result.push(attrib.name);
	}
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy