Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ask for a method in javascript prototype
- //FactVal
- UTIL.Classes.FactVal = function(entity, attribute, value) {
- this.entity = entity;
- this.attribute = attribute;
- this.value = value;
- }
- UTIL.Classes.FactVal.prototype.setEntity = function(entity) {
- this.entity = entity;
- }
- "FactVal": {
- "entity": {
- "string": "blabla"
- }
- }
- if(UTIL.Classes[i].("set" + j[0].toUpperCase() + j.substring(1,j.length)))
- if(UTIL.Classes[i].("set" + j[0].toUpperCase() + j.substring(1,j.length)))
- if(typeof UTIL.Classes[i]["set" + j[0].toUpperCase() + j.substr(1)] === "function")
- if(UTIL.Classes[i].prototype["set" + j.charAt(0).toUpperCase() + j.substring(1,j.length)])
- if(typeof UTIL.Classes[i].prototype["set" + j.charAt(0).toUpperCase() + j.substring(1,j.length)] === "function")
- x = obj.foo;
- x = obj["foo"];
- // or
- s = "foo";
- x = obj[s];
- // or
- p1 = "f";
- p2 = "o";
- x = obj[p1 + p2 + p2];
- FactVal.setEntity
- Factval.prototype.setEntity
- if( UTIL.Classes[i].prototype["set" + j[0].toUpperCase() + j.substring(1,j.length)] )
- if (typeof URIL.Classes[i]["set" + (...)] === "function")
Add Comment
Please, Sign In to add comment