MCPcopy Create free account
hub / github.com/socketstream/socketstream / setHtmlIe8SafeWay

Function setHtmlIe8SafeWay

docs/js/angular-bootstrap-prettify.js:28–34  ·  view source on GitHub ↗

* http://stackoverflow.com/questions/451486/pre-tag-loses-line-breaks-when-setting-innerhtml-in-ie * http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript

(element, html)

Source from the content-addressed store, hash-verified

26 * http://stackoverflow.com/questions/195363/inserting-a-newline-into-a-pre-tag-ie-javascript
27 */
28function setHtmlIe8SafeWay(element, html) {
29 var newElement = angular.element('<pre>' + html + '</pre>');
30
31 element.empty();
32 element.append(newElement.contents());
33 return element;
34}
35
36
37directive.jsFiddle = function(getEmbeddedTemplate, escape, script) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected