Created
May 10, 2010 19:19
-
-
Save svenwin/396407 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Chrome specialities | |
x.name = uki.newProperty('_name'); // assings a closure to name | |
// Uki model code: | |
addFields: function(target, names) { | |
for (var i=0; i < names.length; i++) { | |
target[names[i]] = uki.data.model._newProp(names[i]); | |
console.log(i, target[names[i]], names[i]); | |
} | |
// do not break prototypes | |
target._fields = names.concat(target._fields || []); | |
}, | |
/* produces | |
0 function (value) { | |
if (value === undefined) return this[field]; | |
if (setter) { setter.call(this, value); } else { this[field] = value; }; | |
return this; | |
} "id" | |
client.cjs:76741 "" "name" | |
client.cjs:76742 function (value) { | |
if (value === undefined) return this[field]; | |
if (setter) { setter.call(this, value); } else { this[field] = value; }; | |
return this; | |
} "usage_count" | |
name seems to be a reserved word in chrome... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment