On 2007/9/5, Ian Hickson <ian@hixie.ch> wrote: > Wouldn't: > > with (myDiv.classList) { > add('toFront'); > toggle('maximized'); > } > > ...be the better way to do this? In general the DOM doesn't do > chaining-style APIs, so I'm reluctant to add it here. As far as I remember, use of "with" statement is discouraged due to performance problems in existing implementations. Anyway there is good use case for function chaining in current Javascript frameworks like jQuery and IIRC prototype.js with some extensions. But it's just came to my mind; I wont zealously fight for this :) -- Regards, Marek PawłowskiReceived on Wednesday, 5 September 2007 20:42:51 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:40:00 GMT