Difference between revisions of "Javascript properties"
From John Freier
(Created page with 'List all the properties of a Titanium Javascript element. for(var prop in e) { if ((typeof e)=="function") { Ti.API.log(prop + ":function"); …') |
|||
Line 2: | Line 2: | ||
for(var prop in e) { | for(var prop in e) { | ||
− | + | if ((typeof prop)=="function") { | |
− | if ((typeof | + | console.log(prop + ":function"); |
− | + | ||
− | + | ||
− | + | ||
} else { | } else { | ||
− | + | console.log(prop + ":" + e[prop]); | |
− | + | ||
− | + | ||
} | } | ||
} | } |
Latest revision as of 13:54, 27 May 2015
List all the properties of a Titanium Javascript element.
for(var prop in e) { if ((typeof prop)=="function") { console.log(prop + ":function"); } else { console.log(prop + ":" + e[prop]); } }