From 4dece6b27756f9158789ed3e9e8912fe27cce381 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Mon, 22 Oct 2007 22:16:32 +0000 Subject: [PATCH] Use String#include wherever possible. --- CHANGELOG | 2 ++ src/event.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 7b838e1..16b5427 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Use String#include wherever possible. + * In IE, allow opacity to be set on elements not yet attached to the document. Closes #9904. [Thomas Fuchs, dcpedit, Tobie Langel] * Avoid the try..catch block in Ajax.Response#_getResponseJSON unless required. [Tobie Langel] diff --git a/src/event.js b/src/event.js index b011bea..f5e8a99 100644 --- a/src/event.js +++ b/src/event.js @@ -133,7 +133,7 @@ Object.extend(Event, (function() { } function getDOMEventName(eventName) { - if (eventName && eventName.match(/:/)) return "dataavailable"; + if (eventName && eventName.include(':')) return "dataavailable"; return eventName; }