Uize.Node.Classes has a bug in with respect to how it tests if a string is a class w/in the className property. This is easily seen with Uize.Node.Classes.hasClass.
Let's say we have the following node:
<div id="foo" class="bar-bat baz">Test</div>
And we execute the following code:
Uize.Node.Classes.hasClass('foo', 'bar')
This will return true even tho bar is not a class of the foo div. Looking deep into the code, it appears that the regular expression used to determine if a string is in the className uses a word boundary (\b) which works for spaces or the beginning/end of the className, but also targets hyphens which are actually a valid CSS character.
Uize.Node.Classeshas a bug in with respect to how it tests if a string is a class w/in theclassNameproperty. This is easily seen withUize.Node.Classes.hasClass.Let's say we have the following node:
And we execute the following code:
This will return
trueeven thobaris not a class of the foo div. Looking deep into the code, it appears that the regular expression used to determine if a string is in theclassNameuses a word boundary (\b) which works for spaces or the beginning/end of theclassName, but also targets hyphens which are actually a valid CSS character.