Permalink
Browse files

Object.create fallback for FF 3.6 implemented (by Ben Newman!)

  • Loading branch information...
1 parent 314d421 commit 91533ad65717a18b31d107744dc901f88003002a @mrflix committed May 16, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 js/application.js
View
@@ -77,6 +77,20 @@ jQuery.extend({
}
});
+// Object.create implementation for older browsers
+// by Ben Newman
+
+if(Object.create === undefined){
+ Object.create = function( proto, props ) {
+ var ctor = function( ps ) {
+ if ( ps )
+ Object.defineProperties( this, ps );
+ };
+ ctor.prototype = proto;
+ return new ctor( props );
+ };
+}
+
/*
things to store:

0 comments on commit 91533ad

Please sign in to comment.