Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

tiffon

Registrato in data
tiffon

Aggiornamenti alla documentazione

Mostra tutte le attività
Pagina Data Commento

Element.matches()


More performant polyfill: https://jsperf.com/element-matches-polyfill-comparison

Array.prototype.sort()


Typo in the edit I made earlier: https://jsfiddle.net/hmk35hhf/2/

Array.prototype.sort()


Returning `0` for equal values can have significant performance benefits. Number of comparator invocations to sort a list of 1024 items: Chrome (2,050 vs 68,142), Firefox (9,045 vs 9,129), Safari (9,194 vs 9,194) jsfiddle: https://jsfiddle.net/hmk35hhf/1/

General sibling selectors