iterate non-enumerables in old IE also#2696
iterate non-enumerables in old IE also#2696SergioCrisostomo merged 4 commits intomootools:masterfrom
Conversation
|
👍 but why can't you guys implement all these methods by way of |
|
@megawac this was the best I came up with. Input is really welcome, to make it even better :) In this case since its a IE8- fix i think |
|
I mean Looks like this fix isn't being applied to |
|
@megawac oh, I see. Actually |
|
@SergioCrisostomo I would say it should be the other way around (thats how most other frameworks otu there are doing it). Having I would argue all the object methods ( |
|
I think that'd be better indeed. We have to move Object.keys to Core.js from Types/Object.js. After that we could rewrite all |
ca342a3 to
0ee7a00
Compare
Source/Core/Core.js
Outdated
|
@arian updated again. |
Source/Core/Core.js
Outdated
There was a problem hiding this comment.
I think eachKey isn't a very nice name. maybe objectEach, or just each?
Also I'm thinking if this shouldn't be:
var objectKeys = Object.keys || function(object){
// ...
return keys;
};And use that in the overloadSetter, with a for-loop there.
And below, just have:
Object.extend({
keys: objectKeys,
forEach: // ...
});9d41b14 to
7270530
Compare
Source/Core/Core.js
Outdated
There was a problem hiding this comment.
Seriously, use else if, not the x && y thing!
7270530 to
144e445
Compare
overloadSetter needs to loop over non own properties too.
144e445 to
9f9128a
Compare
|
added commit and just rebased. |
iterate non-enumerables in old IE also
fixes #2613