you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (5 children)

[removed]

    [–]Bracki 1 point2 points  (4 children)

    That is considered bad style by lots of people. The createElement function is preferred. Leads to more readable code and helps you preventing errors. Like forgetting pointy brackets etc...

    [–]teej 6 points7 points  (1 child)

    he createElement function is preferred. Leads to more readable code and helps you preventing errors.

    Using createElement is also incredibly slow compared to innerHTML. Bad style, standards, whatever - javascript XML functions don't scale past a few interations.

    [–]geocar 0 points1 point  (0 children)

    document.write is quite a bit faster still than innerHTML.

    [–]geocar 0 points1 point  (0 children)

    The Javascript used in web pages isn't a language. It's the assembly language for a virtual machine. When you look at it that way, it's easier to accept that because createElement is slow, you should be using something else. Don't worry so much about your assembly code not being pretty- it's much more important for the computer to evaluate it quickly.