Contents tagged with JavaScript
-
Visual Studio 2008 “Format Document/Selection” command and a function named “assert” in JavaScript code
Just have found some funny behavior of the Visual Studio 2008 editor. Sorry if it is already well known bug.
-
jQuery Templates Proposal – dissecting plugin code
As you’ve probably heard, it was announced during the second-day MIX keynote that Microsoft is going to contribute to jQuery project. As a part of the contribution templating proposal was written and experimental plugin code is already available.
-
Lazy HTML attributes wrapping in Internet Explorer
Having encountered this Internet Explorer (all versions) behavior several times previously, I eventually decided to share this most probably useless knowledge. Excuse my lengthy explanations because I am going to show the behavior along with a very simple case when one can come across it inadvertently.
-
Firefox 3. XSLT Processing Engine bug?
I stumbled upon really strange issue while researching unexpected behavior of existing web application under Firefox 3.
-
Array.prototype.slice vs manual array creation
In a constant pursuit of new and more effective ways to implement common JavaScript code patterns I've recently found out (sorry for such probably trivial finding but it was a real news for me) that Array.prototype.slice method can be easily used to make instance of Array from an arguments object.
I instantly decided to use it in my current projects. Currently the same task is performed by simple iteration through members of the arguments object and filling in respective members of a new Array instance.
I was pretty sure that performance of the new variant will be significantly better. It is a native method call after all instead of interpreted JavaScript code. Nevertheless, I wanted to run simple comparison tests and wrote following code: