AJS 4.1
Some days ago I released a AJS 4.1 and it has some nice improvements.
Minify improvedNow one can minimize AJS even if functions aren't prefixed with AJS.. For example, for iRemind I got AJS down to 11 KB (from 35 KB). For most of my projects I export AJS to the global scope, since it's really tedious to type AJS. all the time. One can use the JavaScript module pattern to still keep the namespaces clean: (function() {
AJS.exportToGlobalScope(this);
var span = SPAN({c: 'highlight', s: 'color: red'}, 'This is a test');
RCN(getBody(), span);
}());
Small shortcutsI create a lot of DOM in JavaScript and I was really tired of typing 'class': and 'style':, so in the new version one can do this: var span = SPAN({c: 'highlight', s: 'color: red'}, 'This is a test');
Intead of: var span = SPAN({'class': 'highlight', style: 'color: red'}, 'This is a test');
Notice that you have to use 'class', since class is a keyword. It's a small improvement, but saves some keystrokes.
Announcements
·
Code
·
JavaScript
·
Tips
•
31. Aug 2007
4 comments so far
Post a comment
Commenting on this post has expired.
|
Blog labels |