Skip to content

Instantly share code, notes, and snippets.

@Raynos
Created September 17, 2011 01:02
Show Gist options
  • Save Raynos/1223475 to your computer and use it in GitHub Desktop.
Save Raynos/1223475 to your computer and use it in GitHub Desktop.
var Bar = { bar: ... }
var Foo = { foo: ... }
var Delegate = {
foo: function() {
Foo.foo.apply(this, arguments);
},
bar: function() {
Bar.bar.apply(this, arguments);
}
}
var Composite = extend({}, Bar, Foo);
var Prototype = Object.create(extend(Bar, Foo))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment