Created
August 22, 2009 22:17
-
-
Save RStankov/173015 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$H(Element.Storage).inject(0, function(m, p){ | |
var registry; | |
if (p.value.get && (registry = p.value.get('prototype_event_registry'))){ | |
m += registry.values().flatten().size(); | |
} | |
return m; | |
}); | |
// bookmarked, witch uses Element.Storage or Event.cache dependent on the Prototype version | |
(Element.Storage ? $H(Element.Storage).values().slice(1).invoke('get', 'prototype_event_registry').compact() : | |
Event.cache.values()).inject(0, function(m, p){ return m += $H(p).values().flatten().size(); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment