Prototype 1.6: Observe “contentloaded” changed to “dom:loaded”

This one caught me off guard. After upgrading from Prototype 1.6 RC0 straight to the final release I found that all my custom JavaScript code simply lay there dormant. Fighting off panic I did some quick googling and ran across this post detailing how custom events are now namespaced. Hopefully this post helps others out there who find themselves in the same situation.

//Wrong
document.observe("contentloaded", function () {...});

//Right
document.observe("dom:loaded", function () {...});

Leave a Reply