From 174dc890089a69e0245a112bae1b6c4088c1b675 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Mon, 1 Jul 2013 16:44:45 -0700 Subject: [PATCH] Fix for IE8 compatibility Instead of using Object.create, just shuffle the prototypes around so that we don't need to include es5-sham. --- src/event/synthetic/SyntheticEvent.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/event/synthetic/SyntheticEvent.js b/src/event/synthetic/SyntheticEvent.js index 2370528851f..c17bfd6ce7d 100644 --- a/src/event/synthetic/SyntheticEvent.js +++ b/src/event/synthetic/SyntheticEvent.js @@ -141,10 +141,13 @@ SyntheticEvent.Interface = EventInterface; SyntheticEvent.augmentClass = function(Class, Interface) { var Super = this; - var prototype = Object.create(Super.prototype); + function ctor() { + this.constructor = Class; + } + ctor.prototype = Super.prototype; + var prototype = new ctor(); mergeInto(prototype, Class.prototype); Class.prototype = prototype; - Class.prototype.constructor = Class; Class.Interface = merge(Super.Interface, Interface); Class.augmentClass = Super.augmentClass;