Hi!
I had problems using the 'invoke' method with an Hash :
the Enumerable API says about 'invoke' : "Invokes the same method,
with the same arguments, for all items in a collection. Returns the
results of the method calls."
so I expected the following code to work :
function A() {};
A.prototype.d
On 11 March 2011 01:17, joe t. wrote:
> One note on TJ's post, hopefully helpful:
>
> You cannot CANCEL the unload event. If i understand them correctly,
> load and unload are the only native events that can't be canceled from
> scripts. You can perform other actions, but unload means the browser
works fine now, thank you very much for explaining
On 10 Mrz., 16:05, "T.J. Crowder" wrote:
> Hi,
>
> Sorry, that list should have been:
>
> Using 1.6.1 and "=", works:http://jsbin.com/ewire5/
> Using 1.7 and "=", doesn't work:http://jsbin.com/ewire5/2
> Using 1.7 and "$=", works:http://jsbin.com
T.J. Crowder wrote:
> Yes, you can run functions using the window unload event. Example:
> http://jsbin.com/apuke4
> Open that link in a tab, click "Open Window", then close the tab you
> opened the link in -- the subordinate window closes as well.
> What you can do in those functions is severel
Hi François
You should use
h.values().invoke("draw");
As specified in the Has#each method, the iterator's first argument is an
object with two properties : key and value
http://api.prototypejs.org/language/Hash/prototype/each/
On Thu, Mar 10, 2011 at 8:17 PM, Francois wrote:
> Hi!
> I had proble
On Mar 11, 2011, at 7:41 AM, Bertilo Wennergren wrote:
Here's a limitation with "beforeunload" (in case someone hasn't
heard):
More of less the only thing you can do with "beforeunload", is to ask
the user if he or she really wants to leave the page. A dialog
will appear, and the user can choo
Ok it's much clearer now!
Merci Guillaume!
On Mar 11, 2:35 pm, Guillaume Lepicard
wrote:
> Hi François
>
> You should use
> h.values().invoke("draw");
> As specified in the Has#each method, the iterator's first argument is an
> object with two properties : key and
> valuehttp://api.prototypejs.
Here's a sample from code that i wrote and seems to work ok (at least,
last i tested it, i no longer work there), adapted for generics:
http://pastie.org/1661648
So here's what i learned, now that my curiosity got roused...
The beforeunload event will automatically generate the prompt. If you
wan
On Mar 11, 2011, at 7:50 PM, joe t. wrote:
Here's a sample from code that i wrote and seems to work ok (at least,
last i tested it, i no longer work there), adapted for generics:
http://pastie.org/1661648
So here's what i learned, now that my curiosity got roused...
The beforeunload event wil