Perfection Kills

by kangax

Exploring Javascript by example

← back 298 words

Prototype Cheat Sheet

A long awaited Prototype cheat sheet – a full reference to a bleeding edge is finally here. I had no experience creating something like this before, so any bugs or suggestions are very much appreciated. Couple of notes about notations:

  • Modules are sorted in a somewhat logical order – those commonly used are mostly in the left/center area, while deprecated/utility methods are all the way to the right
  • Method can be recognized by parentheses following it (anything that doesn’t have ones is a property)
  • Deprecated items are marked red and have NO parentheses/arguments specified
  • Prototype extends quite few native objects’ prototypes with a set of convenient methods. In such cases there’s an explicit note about it next to a module name – i.g. stripScripts() method from “String (String.prototype)” can be called as 'foo'.stripScripts()
  • When a module is also a class, there’s a “(constructor)” note next to it – i.g. “Hash (constructor)” means that it should be called as new Hash()
  • There are few bonus items (such as those from Prototype.Browser) which are not yet included in documentation

Download (55534 downloads) and Enjoy!

I have managed to choose the most retarded format for the cheat sheet – almost squared – which was impossible to print or navigate. Sincere apologies. There is an updated version at the same address which also fixes few other annoyances:

  • Ajax.Responders is now a separate section
  • Added missing
  • Added Prototype.BrowserFeatures.XPath
  • Added simple “Dimensions/Offsets” diagram
  • Minor rearrangements

Update 2:
Uploaded a Higher Contrast version (8344 downloads)
Seems to look much better when printed.

Did you like this? Donations are welcome

comments powered by Disqus