Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Did you know that DOM Level 3 specifies that getAttribute returns the empty string if an attribute is not present OR if it is present but its value is the empty string, whereas CSS Selectors 3 specifies that the attribute selector [attr] matches if the attribute is declared, even if its value is the empty string. This means that using the DOM to implement CSS Selectors 3 requires one to test for the actual presence of the attribute, rather than just seeing if a value is returned.
I only found this when debugging an entirely different test case that was failing... it's going to be a long afternoon
Comment