Extending Document Object in CS5
I would like to extend the Document object (or any other, for that matter) as described in this thread:
http://forums.adobe.com/message/1103689#1103689
I tried extending Application with myOwnMethod as described, but even that doesn't work. When I "alert" the extended function, it prints the implementation code of the procedure! Here's the code:
Application.prototype.myOwnMethod = function() {
return "Test String proto"
}
alert(app.myOwnMethod)
When run, the alert box contains:
function() {
return "Test String proto"
}
What do I do to extend the Document or Application objects?
