From 23f7cb642c3fbb23c58975717b055f55124891de Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Thu, 20 Dec 2007 13:10:42 +0000 Subject: [PATCH] prototype: Fix incorrect variable declaration in Event.fire. Closes #10329. --- CHANGELOG | 1 + src/event.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 58d511a..9c67ac8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,5 @@ *SVN* +* Fix incorrect variable declaration in Event.fire. Closes #10329. [rubley] * Fix the way Selector handles [pseudoclass + combinator] with no space in between. Closes #9696. [kangax, fearphage, Andrew Dupont] diff --git a/src/event.js b/src/event.js index 6265d51..eae29ae 100644 --- a/src/event.js +++ b/src/event.js @@ -242,11 +242,12 @@ Object.extend(Event, (function() { if (element == document && document.createEvent && !element.dispatchEvent) element = document.documentElement; + var event; if (document.createEvent) { - var event = document.createEvent("HTMLEvents"); + event = document.createEvent("HTMLEvents"); event.initEvent("dataavailable", true, true); } else { - var event = document.createEventObject(); + event = document.createEventObject(); event.eventType = "ondataavailable"; }