W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

[whatwg] createElement convenience method

From: Keryx Web <webmaster@keryx.se>
Date: Sun, 21 Oct 2007 22:57:56 +0200
Message-ID: <471BBD54.9020702@keryx.se>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC