Skip to content

Instantly share code, notes, and snippets.

@ankona
Created April 11, 2014 13:59
Show Gist options
  • Save ankona/10471262 to your computer and use it in GitHub Desktop.
Save ankona/10471262 to your computer and use it in GitHub Desktop.
JS to list methods / properties on a javascript object
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)
}
}
@ankona
Copy link
Author

ankona commented Apr 11, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment