Here is roughly what I am doing in the extension (tested with Firefox
nigthly and Firefox 6)
jsd.enumerateScripts(
{
enumerateScript: function(script)
{
var func = script.functionObject;
var props = self.getProperties(func);
sysout(props.join(", "));
}
});
getProperties: function(scope)
{
var props = [];
var listValue = {value: null}, lengthValue = {value: 0};
scope.getProperties(listValue, lengthValue);
for (var i=0; i<lengthValue.value; ++i)
{
var prop = listValue.value[i];
var name = prop.name.getWrappedValue();
props.push(name);
}
return props;
},
My Test page:
<script type="text/javascript">
var myFunction = function(msg)
{
console.log("Hello");
}
myFunction.myProperty = "My Test Function";
</script>
---
All I am getting for myFunction object is:
caller, arguments, name, length, prototype
There is no "myProperty"
---
Note that it works in cases where Firebug debugger is halted at a
breakpoint and frame.script is used.
Is there anything wrong with the approach I am taking or it rather
sounds like a bug?
Honza