Permalink
Browse files

Update observable class to insert element into the dom, otherwise ie …

…complains
  • Loading branch information...
1 parent 5b56fda commit f3d1dcd96796442b96c133f48de65671f6d59688 Juriy Zaytsev committed Jan 20, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 class.observable.js
View
@@ -15,7 +15,9 @@
// with corrections by John David Dalton and juanbond
(function(){
function getElement(object){
- return (object._eventElement = object._eventElement || new Element('code'));
+ return (object._eventElement = object._eventElement ||
@Caged

Caged Jan 20, 2009

I’m glad you tweeted when you did. Saved me a couple hours pecking around wondering what in fireEvent was causing the problem. \m/

+ (document.body || document.documentElement)
+ .appendChild(new Element('div')));
}
Class.Observable = {
observe: function(eventName, handler) {

1 comment on commit f3d1dcd

shilin commented on f3d1dcd Jan 28, 2009

Спасибо за скрипт, теперь onchange отслеживает когда я выбираю ту же самую опцию в комбобоксе во второй раз. Сэкономил много времени :)

Please sign in to comment.