summaryrefslogtreecommitdiff
path: root/itjs
diff options
context:
space:
mode:
Diffstat (limited to 'itjs')
-rw-r--r--itjs/it.js9
1 files changed, 9 insertions, 0 deletions
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