(tagName, html, force)
| 1113 | // tags. So we wrap the string with enclosing HTML (if necessary), stick it |
| 1114 | // in a DIV, then grab the DOM nodes. |
| 1115 | function getContentFromAnonymousElement(tagName, html, force) { |
| 1116 | var t = INSERTION_TRANSLATIONS.tags[tagName], div = DIV; |
| 1117 | |
| 1118 | var workaround = !!t; |
| 1119 | if (!workaround && force) { |
| 1120 | workaround = true; |
| 1121 | t = ['', '', 0]; |
| 1122 | } |
| 1123 | |
| 1124 | if (workaround) { |
| 1125 | div.innerHTML = ' ' + t[0] + html + t[1]; |
| 1126 | div.removeChild(div.firstChild); |
| 1127 | for (var i = t[2]; i--; ) |
| 1128 | div = div.firstChild; |
| 1129 | } else { |
| 1130 | div.innerHTML = html; |
| 1131 | } |
| 1132 | |
| 1133 | return $A(div.childNodes); |
| 1134 | //return SLICE.call(div.childNodes, 0); |
| 1135 | } |
| 1136 | |
| 1137 | /** |
| 1138 | * Element.clone(@element, deep) -> Element |
no test coverage detected