OZONE Asylum
Forums
DHTML/Javascript
Drum roll - twenty liners rules discussion
This page's ID:
29904
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[quote]However, in my specific example those function calls eliminated a lot of user code by embedding it into a string which got compiled as a function body. This specific use to eliminate executable code from the count is what I would call cheating, on the other hand.[/quote]Agreed. By "native" I meant implemented by the browser, not in JavaScript. [code]/* */ function fn( func ) /* */ { /* C */ return function() /* */ { /* D */ return func.apply( this, arguments )||this; /* */ } /* */ } /* A */ for( chainThat in {methodA:1,methodB:1} ) /* */ { /* B */ anObject.prototype[chainThat] = /* E */ fn( anObject.prototype[chainThat] ); /* */ }[/code]Can be used to make native methods, on a same type of object/element, chainable ;) [url=http://www.p01.org/][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img][/url] [small](Edited by [url=http://www.ozoneasylum.com/user/2185]poi[/url] on 01-24-2008 23:19)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »