need a selector to match full string
|Reported by:||G_Gus||Owned by:|
|Keywords:||contains selector text||Cc:|
:contains() is the very only selector that operates on text.
Here's the actual jQuery code:
// Text Check contains: "(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m)>=0",
the method for matching text is .indexOf() , so it returns true if the text is contained, with no option for exact matching.
I think that another selector that operates on text is needed. I wrote a simple exact matching selector:
it does make use of == operand instead of .indexOf() method
What do you think about it?
Change History (6)
comment:1 Changed 7 years ago by dmethvin
- Summary changed from need for a selector to match full string, as :contians() selector match only substring to need a selector to match full string
comment:4 Changed 6 years ago by dmethvin
- Keywords needsreview removed
- Resolution set to invalid
- Status changed from new to closed