limodou wrote: > I think extend built-in class prototype is the best way just like > prototype.js done. If we create a new type, and hope it could work > like String,Array,etc, we must implement many things according String, > Array, etc, so it's not very beautiful, and not very useful. > > And I think these things should be somewhat infrastructure, of cause > we can seperate them into a individual file, so people can import it > selectively. > Sounds like a good idea to me.
I created a proof of concept (using String.prototype.trim as an example), that should meet the following requirments: - Useful - Clean, short, readable - Tested via automatic test suite - Well documented Please have a look at this: http://joern.jquery.com/stringSandbox/stringTest.html It uses Stefan's experimental console and logs to the Firebug console, if available. I hope someone has an idea (*waves at John*) how this could be packaged (with jQuery) and parsed to have the documentation online. On a side note, I just had a look at Prototype. It's really daunting that there is absolutly no documentation available on the official site or packaged with the download. Hooray for jQuery! -- Jörn _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
