mootools / slick

Standalone CSS Selector Parser and Engine. An official MooTools project.
MIT License
150 stars 22 forks source link

Fix Slick.getAttribute, expose Slick.hasAttribute so it can be used as MooTools getProperty #45

Closed arian closed 13 years ago

arian commented 13 years ago

Add maxLength to attributes. Expose Slick.hasAttribute and makes sure the document is set when using Slick.getAttribute

cpojer commented 13 years ago

This is sweet. @subtleGradient what do you say?

arian commented 13 years ago

As shown here, http://jsfiddle.net/arian/Hd3hd/, leaving local.setDocument was a bug.

subtleGradient commented 13 years ago

Looks good. All except the toLowerCase. Remove that and I'll merge.

subtleGradient commented 13 years ago

Alternatively you could add all the various cases to the object as references to the same getter. e.g. attributeGetters.MAXLENGTH = attributeGetters.maxLength = attributeGetters.maxlength

arian commented 13 years ago

ah, yeah good idea, will fix it in a minute!

arian commented 13 years ago

@subtleGradient merge it :)