Removed enumerable from methods, fixed number property

This commit is contained in:
Fabian Vogelsteller 2015-02-20 10:50:19 +01:00
parent ce141d8ec3
commit ed7d473efd
5 changed files with 12 additions and 24 deletions

14
dist/ethereum.js vendored
View File

@ -620,7 +620,7 @@ var properties = [
{ name: 'blockNumber', getter: 'eth_number'},
// deprecated properties
{ name: 'number', call: 'eth_number', newProperty: 'blockNumber'}
{ name: 'number', getter: 'eth_number', newProperty: 'blockNumber'}
];
@ -1878,11 +1878,7 @@ var setupMethods = function (obj, methods) {
} else {
Object.defineProperty(obj, method.name, {
enumerable: (method.newMethod) ? false : true,
value: callFunction
});
obj[objectMethods[0]] = callFunction;
}
});
@ -1919,10 +1915,8 @@ var setupProperties = function (obj, properties) {
};
}
Object.defineProperty(obj, property.name, {
enumerable: (property.newProperty) ? false : true,
value: proto
});
proto.enumerable = !property.newProperty;
Object.defineProperty(obj, property.name, proto);
});
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -91,7 +91,7 @@ var properties = [
{ name: 'blockNumber', getter: 'eth_number'},
// deprecated properties
{ name: 'number', call: 'eth_number', newProperty: 'blockNumber'}
{ name: 'number', getter: 'eth_number', newProperty: 'blockNumber'}
];

View File

@ -70,11 +70,7 @@ var setupMethods = function (obj, methods) {
} else {
Object.defineProperty(obj, method.name, {
enumerable: (method.newMethod) ? false : true,
value: callFunction
});
obj[objectMethods[0]] = callFunction;
}
});
@ -111,10 +107,8 @@ var setupProperties = function (obj, properties) {
};
}
Object.defineProperty(obj, property.name, {
enumerable: (property.newProperty) ? false : true,
value: proto
});
proto.enumerable = !property.newProperty;
Object.defineProperty(obj, property.name, proto);
});
};