Sunday, January 29, 2006

DOM Scripting Task Force » Blog Archive » Shorter DOMScripting via cloning vs. generating new elements?

DOM Scripting Task Force » Blog Archive » Shorter DOMScripting via cloning vs. generating new elements?: "Shorter DOMScripting via cloning vs. generating new elements?
January 6th, 2006 by Christian Heilmann

Writing some scripts I realised lately that a lot of times we repeat code over and over again, especially when we generate HTML - like list items with embedded links. I wondered if it wouldn’t make sense that instead of creating those where we need them in the script it’ll be more slick to create them once and clone them via cloneNode() later on."

No comments: