In a web page, it may import external javascript files, and it may contains inline javascript code, it may also use a activex control which may also expose javascript api, then how can I know all the functions available there in a web page?
You could iterate over the window object and filter the functions:
function getFunctions(obj)
{
var functions = {};
for (var attr in obj)
{
if ( typeof(obj[attr])=="function" )
{
functions[attr] = obj[attr];
}
}
return functions;
}
var functions = getFunctions(window);