Welcome to my corner of the web, where I post my ponderings, pictures and pontifications.

Creating Elements in JavaScript, (any good?)

I’ve been playing around with a couple of ideas for JavaScript methods, thought I’d get some feedback.

The following link is a code snippet in PasteBin that shows the methods and a quick test:

http://pastebin.com/f7b68ab19

Basically, the two I wrote and that I’m evaluating are:

Create Element
This method caches a created element instance in an array. In some browsers, like Firefox, this method is marginally faster; I’m thinking the array access is hindering it from being even faster.
Create Element with Properties
This method basically allows you to set attributes using a JSON object. Nothing fancy, but the developers like it. I’m concerned about the speed of the loop, and developers have been asking about how to set the runtime style. Since element.style is, of course, not settable, I’d have to either expose a second parameter, or allow a more complex object and write more logic, (assuming I decide to support it).

I’d love some advice… here’s what I don’t want:

Just use jQuery / Prototype / my framework!

That kind of defeats the purpose of this exercise! :-)

Run Safari 3 and Safari 4 beta on the same Mac

It’s BACK!

They let ANYONE drive these days…

An Open Letter to a Car Thief

Introducing Shandy

PSD2HTML: Terrible Pricing for Web Development

[PIC] iPhone Launch Security in Kansas City (funny)

An Asymmetrical Evening (and weekend)

New Picture Technique