If I'm building a javascript library (an object) like so:
myLib = new Object():
myLib.myFunctio n = function() {
// blah
}
What happens if I want to add a prototype to myFunction? I'm converting
some code from this form:
MyFunction = function(){
// blah
}
MyFunction.prot otype.myMethod = function() {
// blah
}
and I'm wondering what the implications are.
Andrew Poulos
myLib = new Object():
myLib.myFunctio n = function() {
// blah
}
What happens if I want to add a prototype to myFunction? I'm converting
some code from this form:
MyFunction = function(){
// blah
}
MyFunction.prot otype.myMethod = function() {
// blah
}
and I'm wondering what the implications are.
Andrew Poulos
Comment