Extending is most useful in languages where function invocation is constrained to the object hierarchy. In JavaScript there are no such constraints, so you can simply wrap the 3rd party objects or invoke their functions "in situe" with call or apply. I usually find either technique is more future-proof and less spaghetti-prone than inheritance (no accidental overrides, no oblique/changeable references like 'super', no need for mental model of hierarchy)
This is just my experience - others may have different experiences -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/jsmentors@jsmentors.com/ To search via a non-Google archive, visit here: http://www.mail-archive.com/jsmentors@googlegroups.com/ To unsubscribe from this group, send email to jsmentors+unsubscr...@googlegroups.com