You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow getting the list of classes on an element as an array, i.e. classArray = ele.classes().
Also allow ele.className() and ele.classNames() as aliases of ele.classes().
OP follows:
--
I find it useful to know which classes might be assigned to a collection. Could you provide a space-separated list method, please? I recommend an implementation similar to the following in classes.js.
getClasses: function () {
let ele = this[0];
return (ele != null)
? ele._private.classes.toArray().toString().replace(/,/g, " ")
: "";
},
The text was updated successfully, but these errors were encountered:
It would probably be better to support getting/setting arrays with ele.classNames(), since for v4 it's planned to change the default JSON export to use arrays. That way, classNames() is future-proofed and only old things would need to be changed.
Allow getting the list of classes on an element as an array, i.e.
classArray = ele.classes()
.Also allow
ele.className()
andele.classNames()
as aliases ofele.classes()
.OP follows:
--
I find it useful to know which classes might be assigned to a collection. Could you provide a space-separated list method, please? I recommend an implementation similar to the following in classes.js.
The text was updated successfully, but these errors were encountered: