added Node.prototype.delegate method
added Node.prototype.undelegate method