(Q1)
If you want to add your own additional functions/methods to a Plus!-interface (eg: _IMPMessenger) how do you do that?
I know the use of the 'prototype' property, but that only works for a class of objects, or constructors.
eg:
code:
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
}
So how would you add functions to a Plus! interface?
-------------
(Q2)
In this same context, how do you add your own properties to a Plus! interface? So you can set and retrieve them in the conventional manner. (but so that setting it will invoke your own predefined function of course, and the retrieving will run that same function which will return a value).