[whatwg] createElement convenience method

K?i?tof ?elechovski skrev:
> Convenience methods such as the one proposed here should not make it to the
> standard for the sake of clarity and compatibility; the programmer can reuse
> an existing wrapper function instead:
> var link_to_add = createLink(link_text);
> This approach is safer and saner.
> Best regards,
> Chris

I beg to differ. Native functions speed things up. My suggestion is both 
sane and safe as it is.

This suggestion falls into the exact same category as 
getElementsByClassName.

A. There are existing functions that has similar abilities.

B. This is a very common and repetitive task.

C. Adding this won't break any current code.


Lars Gunther

Received on Sunday, 21 October 2007 13:57:56 UTC