forked from 0x2620/oxjs
temporary fix for video skipping bug (#716); add third parameter (index) to forEach callback; add Geo colors
This commit is contained in:
parent
8c67bf9462
commit
17aca54e7a
5 changed files with 57 additions and 50 deletions
|
|
@ -169,7 +169,7 @@ Ox.forEach <f> forEach loop
|
|||
"012abcfoo"
|
||||
@*/
|
||||
Ox.forEach = function(col, fn, includePrototype) {
|
||||
var isObject = Ox.isObject(col), key;
|
||||
var ind = 0, isObject = Ox.isObject(col), key;
|
||||
// Safari will not loop through an arguments array
|
||||
col = Ox.isArguments(col) ? Ox.makeArray(col) : col;
|
||||
for (key in col) {
|
||||
|
|
@ -177,7 +177,7 @@ Ox.forEach = function(col, fn, includePrototype) {
|
|||
// fixme: fn.call(context, obj[key], key, obj) may be more standard...
|
||||
if ((
|
||||
includePrototype || Object.hasOwnProperty.call(col, key)
|
||||
) && fn(col[key], key) === false) {
|
||||
) && fn(col[key], key, ind++) === false) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue