From 5e7dc7684a92893340e6e5664630a6994ccc0fd7 Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Wed, 12 Mar 2014 11:34:42 +0900 Subject: [PATCH] Initialize CustomEvent correctly --- modules/base.js | 2 +- modules/pseudoTreeBuilder.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/base.js b/modules/base.js index 50255733..51a76493 100644 --- a/modules/base.js +++ b/modules/base.js @@ -750,7 +750,7 @@ var TreeStyleTabBase = { if (!document) document = target.ownerDocument || target; - var event = new CustomEvent(type, { + var event = new this.window.CustomEvent(type, { bubbles : canBubble, cancelable : cancelable, detail : data diff --git a/modules/pseudoTreeBuilder.js b/modules/pseudoTreeBuilder.js index 21220ca9..951ae227 100644 --- a/modules/pseudoTreeBuilder.js +++ b/modules/pseudoTreeBuilder.js @@ -14,7 +14,7 @@ * The Original Code is the Tree Style Tab. * * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi. - * Portions created by the Initial Developer are Copyright (C) 2011-2013 + * Portions created by the Initial Developer are Copyright (C) 2011-2014 * the Initial Developer. All Rights Reserved. * * Contributor(s): YUKI "Piro" Hiroshi @@ -76,7 +76,7 @@ var PseudoTreeBuilder = { ' null\n' + ' ).singleNodeValue;\n' + 'if (label) {\n' + - ' var customEvent = new CustomEvent(%EVENT_TYPE%, {\n' + + ' var customEvent = new doc.defaultView.CustomEvent(%EVENT_TYPE%, {\n' + ' bubbles : true,\n' + ' cancelable : true,\n' + ' detail : {\n' +