mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 11:07:07 +00:00
Fixed: Make the isa property on classes not enumerable. (#3100)
As we have a tool-free bridges between many classes and JavaScript types by setting the isa property on the type, for example CPArray and Array. Using the for...in enumeration the isa property will be included in the loop if the property is enumerable (this is the default behavior). This commit set the property as not enumerable. Also added test case for check that the isa property on classes are not enumerable using a for...in loop.
This commit is contained in:
1 parent
2f563fb870
commit
86d595b086
10 files changed
+173
-13
No files matched your search
@@ -360,4 +360,15 @@ var concat = Array.prototype.concat,
|
||||
|
||||
@end
|
||||
|
||||
Array.prototype.isa = _CPJavaScriptArray;
|
||||
if (Array.prototype.isa !== _CPJavaScriptArray)
|
||||
{
|
||||
Object.defineProperties(Array.prototype,
|
||||
{
|
||||
isa:
|
||||
{
|
||||
value: _CPJavaScriptArray,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user