MCPcopy Create free account
hub / github.com/chigraph/chigraph / getScript

Function getScript

docs/navtree.js:74–91  ·  view source on GitHub ↗
(scriptName,func,show)

Source from the content-addressed store, hash-verified

72}
73
74function getScript(scriptName,func,show)
75{
76 var head = document.getElementsByTagName("head")[0];
77 var script = document.createElement('script');
78 script.id = scriptName;
79 script.type = 'text/javascript';
80 script.onload = func;
81 script.src = scriptName+'.js';
82 if ($.browser.msie && $.browser.version<=8) {
83 // script.onload does not work with older versions of IE
84 script.onreadystatechange = function() {
85 if (script.readyState=='complete' || script.readyState=='loaded') {
86 func(); if (show) showRoot();
87 }
88 }
89 }
90 head.appendChild(script);
91}
92
93function createIndent(o,domNode,node,level)
94{

Callers 3

expandNodeFunction · 0.85
showNodeFunction · 0.85
navToFunction · 0.85

Calls 1

showRootFunction · 0.85

Tested by

no test coverage detected