4 ms·
Thanks for making the library, glad to see you put lots of time into the docs too. Hopefully the can of worms you've opened doesn't drive you crazy, personally
by tericho 13y ago
Thanks for making the library, glad to see you put lots of time into the docs too. Hopefully the can of worms you've opened doesn't drive you crazy, personally I would've stopped the second I found myself writing something like this...
$($($($('.nH .if').children()[1]).children()).children()[1]).children()[1]
:)
[1]https://github.com/KartikTalwar/gmail.js/blob/master/src/gmail.js#L49 https://github.com/KartikTalwar/gmail.js/blob/master/src/gma...
- nilliams 13y agoTo be fair, that's a pretty odd way to write jQuery, which is designed to be chained. It could be rewritten as: $('.nH .if') .children().eq(1) .children() .children().eq(1) .children().eq(1) But if you were just pointing out how brittle it is, then yes, that's still apparent.