Created
April 11, 2014 13:59
-
-
Save ankona/10471262 to your computer and use it in GitHub Desktop.
JS to list methods / properties on a javascript object
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
var obj = document.getElementById('flashObj'); | |
for(var prop in obj){ | |
var fx = obj[prop]; | |
if(obj.hasOwnProperty(prop) && (typeof fx == 'function') && /eval\(instance/.test(fx)){ | |
console.log(prop) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I grabbed this from http://stackoverflow.com/questions/2052361/get-externalinterface-definitions-in-javascript to try to "reverse engineer" the methods exposed by a .swf. I had to remove the last && /eval part to get the list.