diff options
author | Thomas BrĂ¼derli | 2008-08-11 08:31:14 +0000 |
---|---|---|
committer | Thomas BrĂ¼derli | 2008-08-11 08:31:14 +0000 |
commit | 9c2659c1c4a93a1cdf3fe058075dd70084dab22b (patch) | |
tree | 0f41c58cbd53120e0e2cd1a486a0bf99720df7c9 /itjs | |
parent | a9ad07045a2f21ca1ec39ca5e7d636a61e4705ab (diff) | |
download | itools-9c2659c1c4a93a1cdf3fe058075dd70084dab22b.tar.gz itools-9c2659c1c4a93a1cdf3fe058075dd70084dab22b.tar.bz2 itools-9c2659c1c4a93a1cdf3fe058075dd70084dab22b.zip |
Add function to create dom elements (former createElem() in lib.js)
Diffstat (limited to 'itjs')
-rw-r--r-- | itjs/it.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |