MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / startingTag

Function startingTag

code/songhop/www/lib/angular/angular.js:1066–1083  ·  view source on GitHub ↗

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

(element)

Source from the content-addressed store, hash-verified

1064 * @returns {string} Returns the string representation of the element.
1065 */
1066function startingTag(element) {
1067 element = jqLite(element).clone();
1068 try {
1069 // turns out IE does not let you set .html() on elements which
1070 // are not allowed to have children. So we just ignore it.
1071 element.empty();
1072 } catch (e) {}
1073 var elemHtml = jqLite('<div>').append(element).html();
1074 try {
1075 return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
1076 elemHtml.
1077 match(/^(<[^>]+>)/)[1].
1078 replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
1079 } catch (e) {
1080 return lowercase(elemHtml);
1081 }
1082
1083}
1084
1085
1086/////////////////////////////////////////////////

Callers 8

doBootstrapFunction · 0.70
applyDirectivesToNodeFunction · 0.70
assertNoDuplicateFunction · 0.70
invokeLinkFnFunction · 0.70
angular.jsFile · 0.70
patternDirectiveFunction · 0.70
setupAsOptionsFunction · 0.70

Calls 1

lowercaseFunction · 0.70

Tested by

no test coverage detected