Skip to content

Instantly share code, notes, and snippets.

@ttepasse
Created July 19, 2012 15:27
Show Gist options
  • Save ttepasse/3144667 to your computer and use it in GitHub Desktop.
Save ttepasse/3144667 to your computer and use it in GitHub Desktop.
Factory.prototype.create = function (konstruktor /*, args */) {
// Objekt mit dem NC erstellen
var instanz = Object.create(konstruktor.prototype, {
notificationCenter : {
value : this.notificationCenter;
}
});
// Das Objekt noch mal initalisieren
return konstruktor.apply(instanz, args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment