MCPcopy
hub / github.com/requirejs/requirejs / sendToLogPane

Function sendToLogPane

tests/doh/_browserRunner.js:63–90  ·  view source on GitHub ↗
(args, skip)

Source from the content-addressed store, hash-verified

61
62 var _logBacklog = [], _loggedMsgLen = 0;
63 var sendToLogPane = function(args, skip){
64 var msg = "";
65 for(var x=0; x<args.length; x++){
66 msg += " "+args[x];
67 }
68
69 msg = escapeXml(msg);
70
71 // workarounds for IE. Wheeee!!!
72 msg = msg.replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;")
73 .replace(" ", "&nbsp;")
74 .replace("\n", "<br>&nbsp;");
75 if(!byId("logBody")){
76 _logBacklog.push(msg);
77 return;
78 }else if(_logBacklog.length && !skip){
79 var tm;
80 while((tm=_logBacklog.shift())){
81 sendToLogPane(tm, true);
82 }
83 }
84 var logBody=byId("logBody");
85 var tn = document.createElement("div");
86 tn.innerHTML = msg;
87 //tn.id="logmsg_"+logBody.childNodes.length;
88 logBody.appendChild(tn);
89 _loggedMsgLen++;
90 }
91
92 var findTarget = function(n){
93 while(n && !n.getAttribute('_target')){

Callers 1

_browserRunner.jsFile · 0.85

Calls 2

escapeXmlFunction · 0.85
byIdFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…