Blog

Solid Type Checking Functions

Now Available in YourJS John Resig definitely has some awesome code inside of jQuery. One of the things that I think is cool is how jQuery does type checking. After looking through the code, I developed my own flavor of functions using the same principle. Here is the code that Read more…

By Chris West, ago
Blog

Function Overloading in JavaScript

Method overloading is one of the nice things that exists in real programming languages such as Java. Even though JavaScript starts with “Java”, there are very few similarities between the two languages. Still, due to the power of the scripting language, there is a way to overload functions. The most Read more…

By Chris West, ago
Blog

Deep Copy of Arrays

With jPaq and many other JavaScript libraries, it is very easy to do a shallow copy of an array. On the other hand, it isn’t as easy to do a deep copy of arrays. For this reason, I plan on replacing the Array.prototype.clone() function with the following: The above code Read more…

By Chris West, ago
Blog

No jPaq.openWindow() For Now

Up until today, I was interested in writing a more object oriented version of the native window.open() function.  Unfortunately, I found out that there are some major incompatibility issues between browsers.  Let’s take this example for instance: [sourcecode language=”js”] window.open(“http://google.com/”, “”, “left=100,screenX=100,top=100,screenY=100,height=400”); window.open(“http://google.com/”, “”, “left=100,screenX=100,top=100,screenY=100,width=400”); [/sourcecode] As you may have Read more…

By Chris West, ago