JavaScript


Friday, August 24th, 2007

JavaScript Object Layout

Category: JavaScript

Dean Edwards said: “Interesting or confusing? You decide!” Can we answer “both” ? :)

Posted by Dion Almaer at 6:35 am
4 Comments

++---
2.5 rating from 24 votes

Monday, August 20th, 2007

Dojo 0.9 Final Version Released

Category: Announcements, Dojo, JavaScript, Library

Congrats to the entire Dojo team on shipping Dojo 0.9. In short, you can now expect great things from this revamp, including a tight, fast core, a unified good looking set of widgets, and an extensible space for all things Dojo. Now that this new base is out there, the team can continue to build Read the rest…

Posted by Dion Almaer at 1:57 pm
25 Comments

+++--
3.9 rating from 76 votes

Fun with ternary operators

Category: JavaScript

Paul Bakaus wanted to save some bytes, and ended up geeking out on ternary operators and bitwise operations in JavaScript. Ready to write some code like this? < View plain text > javascript condition == true && ( foo() | bar() | some() );   function findActive(selector) {     return selector != undefined   Read the rest…

Posted by Dion Almaer at 6:48 am
15 Comments

++---
2.5 rating from 53 votes

How stacked are you?

Category: JavaScript

Mark Wubben, of sIFR fame, had to write a depth-first tree iterator and was wondering what the call stack limitations were for the various browsers, so he wrote: < View plain text > javascript function Foo() {     Foo.count++; }   Foo.count = 0; Foo.prototype.invoke = function() {     new Foo().invoke(); };   Read the rest…

Posted by Dion Almaer at 4:36 am
16 Comments

+++--
3.4 rating from 21 votes

Friday, August 17th, 2007

JavaScript Model Objects

Category: JavaScript, Library

Denny Ferrassoli has been thinking about data-binding as it related to JavaScript and HTML, and came up with JavaScript Model Objects. His example was a simple table row repeater which looks like: < View plain text > javascript // Data var myTestObj = {             "rows":         Read the rest…

Posted by Dion Almaer at 9:59 am
10 Comments

++---
2.2 rating from 43 votes

Thursday, August 16th, 2007

Prototype 1.6: The event overhaul, and a whole lot more

Category: JavaScript, Library, Prototype

This is big. Prototype 1.6 is a major upgrade, and the first RC has been released. There is a large number of updates and my pet favourites are: The event system has been cleaned up. It now works the way you would expect, with “this” doing the right thing You can observe and fire custom Read the rest…

Posted by Dion Almaer at 8:49 am
11 Comments

+++--
3.7 rating from 96 votes

Wednesday, August 15th, 2007

Lazy Function Definition Pattern

Category: Articles, JavaScript

Peter Michaux has written about the Lazy Function Definition Pattern. His article takes you down the path of implementing a simple problem: Write a function foo that returns a Date object that holds the time that foo was first called. After critiquing 3 iterations he ends up with: < View plain text > javascript var Read the rest…

Posted by Dion Almaer at 7:08 am
27 Comments

++---
2.7 rating from 64 votes

Building an event-based Ajax application

Category: Dojo, JavaScript

Dojo has had a publish/subscribe system forever. With 0.9 it gets even better, and this writeup discusses how you can wire up your Ajax application using pub/sub. If you have an application that uses devices like deferred loading, or “parse on demand”, wrapping it with an initializer helps keep it that way. The final code Read the rest…

Posted by Dion Almaer at 7:02 am
Comment here

++---
2.6 rating from 46 votes

Tuesday, August 14th, 2007

Work around the z-index issue with heavyweight IE components

Category: HTML, JavaScript, Library

Brandon Aaron has developed a general work around for the common, nagging problem with IE6 and heavyweight components such as a select drop down ignoring z-index. Brandon created the background iframe (bgiframe) jQuery plugin which “provides a very small, quick and easy way to fix that problem so you don’t have to worry about it. Read the rest…

Posted by Dion Almaer at 8:18 am
27 Comments

++---
2.5 rating from 187 votes

YUI Compressor: The latest minification tool

Category: Java, JavaScript, Utility

Julien Lecomte has created a new tool that aims to minify better than JSMin, and compress better than the Dojo compressor: The What The YUI Compressor is a new JavaScript minifier. Its level of compaction is higher than the Dojo compressor, and it is as safe as JSMin. Tests on the YUI library have shown Read the rest…

Posted by Dion Almaer at 8:00 am
28 Comments

++++-
4.5 rating from 107 votes

Monday, August 13th, 2007

Ellipsis or “truncate with dots” via JavaScript

Category: JavaScript, Library

Steffen Rusitschka wanted a cross-browser text-overflow:ellipsis, so he created it and told us all about it via Ellipsis or “truncate with dots” via JavaScript. You can see it in action, or download the code. The main ellipsis function: < View plain text > javascript function ellipsis(e) {   var w = e.getWidth() – 10000;   Read the rest…

Posted by Dion Almaer at 8:16 am
13 Comments

++---
2.5 rating from 91 votes

Friday, August 10th, 2007

The choice of Tamarin

Category: Java, JavaScript

John Resig has aggregated the Why Tamarin? debate: What’s the advantage of Tamarin over integrating the Mono VM into Firefox? Mike Shaver: Here are a few, at least as I see them: Optimized to run JavaScript and sibling languages, which is our most important language target by a vast margin. Licensed appropriately. About 1/25 the Read the rest…

Posted by Dion Almaer at 6:22 am
13 Comments

+++--
3.5 rating from 37 votes

Getting Fuzzy with jsfunfuzz

Category: JavaScript, Utility

Jesse Ruderman has released jsfunfuzz, a fuzz tester that hunts for edge cases that can break things. It tests the JavaScript language engine itself, not the DOM. (That means that it works with language features such as functions, objects, operators, garbage collection rather than DOM objects accessed through “window” or “document”.) It has found about Read the rest…

Posted by Dion Almaer at 1:51 am
3 Comments

+++--
3.1 rating from 27 votes

Wednesday, August 8th, 2007

CodePress: Real-time syntax editor

Category: JavaScript, Utility

We posted about a nice syntax highlighting JavaScript editor awhile back. Now we also have a “web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it’s being typed in the browser” named CodePress. It groks languages such as JavaScript, CSS, PHP, Java, Perl, SQL, and HTML, and Read the rest…

Posted by Dion Almaer at 1:05 pm
12 Comments

+++--
3.8 rating from 34 votes

Tuesday, August 7th, 2007

Cross domain JavaScript via DNS

Category: JavaScript, Security

Alex Pooley has written up his thoughts on cross domain JavaScript via DNS. Alex builds on the document.domain fun: The Problem From a naive perspective, it is not possible for a web page from domain D, to access a URL from another domain E due to security considerations. Several workarounds have been developed, namely the Read the rest…

Posted by Dion Almaer at 9:29 am
6 Comments

++---
2.9 rating from 18 votes

Monday, August 6th, 2007

Google Talk client in JavaScript

Category: Comet, Java, JavaScript, Showcase

Zhou Renjian has a new demo

Posted by Dion Almaer at 5:35 am
3 Comments

+++--
3 rating from 22 votes