I didn't know either until I did this.
var element = document.createElement("div");
var count = 0;
for (var index in element.style) count++;
console.log(count); // 413
I didn't know either until I did this.
var element = document.createElement("div");
var count = 0;
for (var index in element.style) count++;
console.log(count); // 413
For further actions, you may consider blocking this person and/or reporting abuse
Peter Wan -
bardui -
Vault Developer -
Shanu -
Top comments (4)
You would need to exclude non-CSS object properties to accurately count:
My browser (Chrome) has 439 ;-)
Thanks, i completely overlooked the
hasOwnProperty
method. Nice catch 👍Can do instead
know that some properties are only SVG related.
-100