From 9c2659c1c4a93a1cdf3fe058075dd70084dab22b Mon Sep 17 00:00:00 2001 From: Thomas BrĂ¼derli Date: Mon, 11 Aug 2008 08:31:14 +0000 Subject: Add function to create dom elements (former createElem() in lib.js) --- itjs/it.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'itjs') diff --git a/itjs/it.js b/itjs/it.js index 9cc03ec..f701261 100644 --- a/itjs/it.js +++ b/itjs/it.js @@ -157,6 +157,15 @@ function it_get_iframe_document(iframe) return iframe.contentWindow ? iframe.contentWindow.document : iframe.contentDocument; } +/* Create a new dom element and append to doc */ +function it_create_element(doc, type, init) +{ + var e = document.createElement(type); + it_set(e, init); + doc.appendChild(e); + return e; +} + /** * Copy attributes from src to dst in a recursive manner. * @param dst Destination object which gets attributes -- cgit v1.2.3