Guest User

Untitled

a guest
Aug 14th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. ask for a method in javascript prototype
  2. //FactVal
  3. UTIL.Classes.FactVal = function(entity, attribute, value) {
  4. this.entity = entity;
  5. this.attribute = attribute;
  6. this.value = value;
  7. }
  8.  
  9. UTIL.Classes.FactVal.prototype.setEntity = function(entity) {
  10. this.entity = entity;
  11. }
  12.  
  13. "FactVal": {
  14. "entity": {
  15. "string": "blabla"
  16. }
  17. }
  18.  
  19. if(UTIL.Classes[i].("set" + j[0].toUpperCase() + j.substring(1,j.length)))
  20.  
  21. if(UTIL.Classes[i].("set" + j[0].toUpperCase() + j.substring(1,j.length)))
  22.  
  23. if(typeof UTIL.Classes[i]["set" + j[0].toUpperCase() + j.substr(1)] === "function")
  24.  
  25. if(UTIL.Classes[i].prototype["set" + j.charAt(0).toUpperCase() + j.substring(1,j.length)])
  26.  
  27. if(typeof UTIL.Classes[i].prototype["set" + j.charAt(0).toUpperCase() + j.substring(1,j.length)] === "function")
  28.  
  29. x = obj.foo;
  30.  
  31. x = obj["foo"];
  32. // or
  33. s = "foo";
  34. x = obj[s];
  35. // or
  36. p1 = "f";
  37. p2 = "o";
  38. x = obj[p1 + p2 + p2];
  39.  
  40. FactVal.setEntity
  41.  
  42. Factval.prototype.setEntity
  43.  
  44. if( UTIL.Classes[i].prototype["set" + j[0].toUpperCase() + j.substring(1,j.length)] )
  45.  
  46. if (typeof URIL.Classes[i]["set" + (...)] === "function")
Add Comment
Please, Sign In to add comment