niklasvh/html2canvas — pull request #297 by Grom-S (2013-11-21 18:39:38+00:00)
Title: incorect z-index sorting fixed

If you omit compare function in javascript `sort()` method it will sort lexicographically (in dictionary order) according to the string conversion of each element.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters

For example:

`[0, 9, 8, 10].sort()`

will place element with z-index `10` on 2nd position of the array