Re: [Proto-Scripty] Re: Fire and Defer
are you using document.fire or Element.fire? because in your other email you said document.fire Element.fire(element, eventName[, memo[, bubble = true]]) document.fire(eventName[, memo[, bubble = true]]) 2011/7/29 kstubs kst...@gmail.com More on this: I keep getting stuck in: function fire(element, eventName, memo, bubble) { ... if (document.createEvent) element.dispatchEvent(event); STUCK HERE: object doesn't support dispatchEvent else element.fireEvent(event.eventType, event); -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/aw8Cm8tqkhMJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. -- Lo bueno de vivir un dia mas es saber que nos queda un dia menos de vida -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Fire and Defer
Try it long-hand: Element.fire.defer('yourElement','your:event'); I haven't tried it, but that's how delay is invoked. You could also just do Element.fire.delay(0,'yourElement','your:event'); which I believe is functionally identical to defer(). Walter On Jul 29, 2011, at 3:55 PM, kstubs wrote: More on this: I keep getting stuck in: function fire(element, eventName, memo, bubble) { ... if (document.createEvent) element.dispatchEvent(event); STUCK HERE: object doesn't support dispatchEvent else element.fireEvent(event.eventType, event); -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/aw8Cm8tqkhMJ . To post to this group, send email to prototype-scriptaculous@googlegroups.com . To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en . -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Fire and Defer
OK, with a little confidence, I'll try again. I am mixing and matching Event and document firing. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/ODjODPjnezcJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
Re: [Proto-Scripty] Re: Fire and Defer
Tested each of these... winning combination is to use Event static method in this case. Bother defer and delay work. So not sure if I have found a bug or not (IE9, regular and compatible modes) so try these out yourself. These have never been an issue in FF and Chrome. //objectLoadingTimer = //document.fire.defer('load:objects_loading'); //document.fire.delay(0,'load:objects_loading'); //document.fire('load:objects_loading'); //Event.fire(document,'load:objects_loading'); //Event.fire.defer(document,'load:objects_loading'); //Event.fire.delay(.01,document,'load:objects_loading'); objectLoadingTimer = Event.fire.delay(.01,document,'load:objects_loading'); alert(objectLoadingTimer); = 6448 Here is the failure Line: 5734 Error: Object doesn't support property or method 'dispatchEvent' -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To view this discussion on the web visit https://groups.google.com/d/msg/prototype-scriptaculous/-/N8jY8XiJ0HkJ. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.