Decorator pattern in JavaScript? Sure can do. Read the article on how to augment arbitrary JavaScript objects with custom before and after events. Basically, it boils down to this: actsAsDecorator(Ajax.InPlaceEditor.prototype); Ajax.InPlaceEditor.prototype.after( ‘enterEditMode’, function() { // do something } ); Nicely done, and very useful to add your own tweaks to existing JavaScript controls and components. … Continue reading JavaScript decorator pattern
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed