Changes between Version 1 and Version 2 of Ticket #11011, comment 10
- Timestamp:
- Nov 27, 2013, 10:09:48 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11011, comment 10
v1 v2 2 2 > 1. Wouldn't `indexOf` be better than `substr`? 3 3 4 No. `indexOf` is slower, because if it does not find 'data-' at the beginning it will look for match. Anyway I replaced `substr` with `slice` because the second one is standardized.4 No. `indexOf` is slower, because if it does not find 'data-' at the beginning it will look for match. Anyway I replaced `substr` with `slice` because the second one is standardized. 5 5 6 6 > 2. It would be good to have a test that even though data-* attr wasn't removed, the next one after it was, so we'll know that loop wasn't terminated completely.