MCPcopy Create free account
hub / github.com/OpenReservation/OpenReservation / startingTag

Function startingTag

OpenReservation/wwwroot/Scripts/angular.js:1288–1305  ·  view source on GitHub ↗

* @returns {string} Returns the string representation of the element.

(element)

Source from the content-addressed store, hash-verified

1286 * @returns {string} Returns the string representation of the element.
1287 */
1288 function startingTag(element) {
1289 element = jqLite(element).clone();
1290 try {
1291 // turns out IE does not let you set .html() on elements which
1292 // are not allowed to have children. So we just ignore it.
1293 element.empty();
1294 } catch (e) {
1295 }
1296 var elemHtml = jqLite('<div>').append(element).html();
1297 try {
1298 return element[0].nodeType === NODE_TYPE_TEXT
1299 ? lowercase(elemHtml)
1300 : elemHtml.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,
1301 function (match, nodeName) { return '<' + lowercase(nodeName); });
1302 } catch (e) {
1303 return lowercase(elemHtml);
1304 }
1305 }
1306
1307 /////////////////////////////////////////////////
1308

Callers 9

doBootstrapFunction · 0.85
applyDirectivesToNodeFunction · 0.85
assertNoDuplicateFunction · 0.85
invokeLinkFnFunction · 0.85
angular.jsFile · 0.85
parseOptionsExpressionFunction · 0.85
patternDirectiveFunction · 0.85

Calls 1

lowercaseFunction · 0.85

Tested by

no test coverage detected