How do I get html attribute order to be consistent when testing in Javascript -
I have components that make them a set of text in the inner HTML:
Fourth & lt; Br> & Lt; Br> Input value = "select" type = "button" & gt;
On setting up internal HTML, the browser will sometimes parse this text:
Fourth & lt; Br> & Lt; Br> & Lt; Input type = "button" value = "select" & gt;
This behavior is dependent on browser because I can do my test to run in FFx, and then because of the order, they will fail in Safari. Properties of
< P> Is there any way I can parse HTML as some DOM-type, and then print it before comparing so that I can expect the continuous sequence of html attributes?
The features in HTML elements are unreadable, which is: the order is irrelevant if your test is considered a special order. So they are doing it wrongly.
Comments
Post a Comment