No, unfortunately the order is till not preserved for DOM:LOADED event.
Thank you for your suggestion.
2010/4/15 Mislav Marohnić mislav.maroh...@gmail.com
I think that dom:loaded handlers should execute in order, since it's a
custom event. Try those instead of load.
document.on(dom:loaded,
In any case, I don't think it would be a fix
Well, that's a shame. I know that browsers do not gurantee the order in
which the event handlers execute, but it is such a convinient and
straightforward approach to do so, isn't it. That is why Firefox, Opera and
all the best browsers embraced it. IE
Well, to be honest, I've been focusing on Firefox and Opera mainly when
developing software and never even thought that order is not guaranteed,
before the task to support IE arrived! So there is plenty of code to
refactor, which is very frustrating. I know that relying on event order
isn't a best
Hi,
Why isn't this issue still
fixed?!
You say still. Is there an _open_ bug report for it in
Lighthouse[1]? Because if there isn't, it's not going to be fixed.
In any case, I don't think it would be a fix, it would be an
enhancement. As far as I know, Prototype does not make any guarantee
as
Hello... Dziamid,
Please the tone of your message is far but polite. The developers of the
prototype project will do everything they can to address issues as they can.
It's not like they don't want to fix certain issues on purpose.
They are users also so if there are nasty bugs in prototype.js
I'm going to agree with others, and say a) this is not a bug, and b) isn't
worth making the change. The observer pattern (on which the event architecture
is based), by design, does not guarantee order; nor should it, as it would
imply the observers are not orthogonal.
If you have order
2009/2/26 Yuncong Zhang njit...@gmail.com:
I'm using prototype 1.5
I want to click once and update text in two div parts. But I find
out when I click the first time, nothing happened; when I click the
second time, both div changed. why is that?
How can I click only once, change both of
Any thoughts??
I didn't test this, so it's based on assumption – but couldn't you
accomplish the same thing by using callBackFunc.bindAsEventListener
(callBackFunc, extraArg1, extraArg2)? I would imagine that would
retain the proper 'this' reference.
-Matt Pennig
Function#bind already accepts any number of arguments, where first one
is used as a scope object and the rest are plugged directly into a
binded function.
$('myElment').observe('click', callbackFunc.bind(anyObj, extraArg1,
extraArg2));
// = when clicked will invoke: callbackFunc(extraArg1,
This has already been suggested as Function#rcurry
http://dev.rubyonrails.org/ticket/9034
- Tobias
On 16 Jan., 23:23, Simon Thomas [EMAIL PROTECTED] wrote:
Ye not bothered about binding but the curry method works (except it
puts the MouseEvent last)
I've always worked to the convention
On 9/14/07, Roland [EMAIL PROTECTED] wrote:
Events can be attached multiple times to the same element..
No, they can't. The addEventListener method doesn't attach a handler more
than once; and as for IE, Prototype 1.6 avoids attaching the same handler
twice. So, in IE we emulate
On Sep 14, 2007, at 1:08 AM, Roland wrote:
Hi there,
Events can be attached multiple times to the same element.. is there a
way to prevent this?
Something like ...
if(!$(el).hasEventAttached()) Event.observe($(el), 'click',
function());
If this is what you *really* need (and I'd
Quite a lot changes for event part of Prototype, onReady and closure
fix for IE this reference bug, and add IE's standard DOM event
model, BTW the MS has released the memory leak bug fix for IE6, and no
memory leaks in IE7, so in this case, will the Prototype still need to
add the onunload event
On 7/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
BTW the MS has released the memory leak bug fix for IE6, and no
memory leaks in IE7, so in this case, will the Prototype still need to
add the onunload event to clear the memory?
I wouldn't think of removing it in my life. No-one can
Have a look at the event branch for this.
On Jul 21, 11:57 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
You must know the attachEvent can only put a function to be a
element's event handler, andd in that function this should be the
element itself, but the internet explorer linked it with
Sorry, here's the link for it:
http://dev.rubyonrails.org/browser/spinoffs/prototype/branches/event
On Jul 22, 12:30 am, Tobie Langel [EMAIL PROTECTED] wrote:
Have a look at the event branch for this.
On Jul 21, 11:57 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
You must know the
function Cat(){
this.color = yellow;
}
Cat.prototype.showColor = function(){
alert(this.color)
}
Cat.prototype.init(){
Event.observe(button, click, this.showColor.bind(this));
}
Will work just fine :) the problem is that when you assign action to a
button the scope of the function
I agree. I had to write my own code do do stuff like you describe.
Event.__observe = Event.observe;
Event.observe = function(element, name, observer, useCapture, observe)
{
observe = (typeof(observe) == 'undefined' ? true : observe);
return new Event.Observer(element, name, observer,
18 matches
Mail list logo