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"; }