Permalink
Browse files

try to avert issues like FB-182

IE9 (in some modes) adds support for addEventListener, but Firebreath
requires events to be attached via attachEvent - so check for that
method first.
  • Loading branch information...
1 parent 2cadcd2 commit 45dfb5bf78d2939f0201c0c90ed10bce8c9d3517 @dougma committed Jun 21, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 gen_templates/FBControl.htm
View
6 gen_templates/FBControl.htm 100755 → 100644
@@ -17,10 +17,10 @@
function addEvent(obj, name, func)
{
- if (window.addEventListener) {
- obj.addEventListener(name, func, false);
- } else {
+ if (obj.attachEvent) {
obj.attachEvent("on"+name, func);
+ } else {
+ obj.addEventListener(name, func, false);
}
}

0 comments on commit 45dfb5b

Please sign in to comment.