File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Just include stacktrace.js file on your page, and call it like so:
1515 ... more code of yours ...
1616 </script >
1717
18- *New!* Bookmarklet: [stacktrace.js](javascript:(function(){loadJS=function(){s=document.createElement('SCRIPT');s.type='text/javascript';s.src='http://eriwen.com/js/stacktrace.js';document.getElementsByTagName('head')[0].appendChild(s);};alertTrace=function(){alert(printStackTrace().join('\n'))};attachToWinError=function(){window.onerror=alertTrace};attachToCustomFunc=function(fn){eval('_old_'+fn+'='+fn+';'+fn+'=function(args){alertTrace();_old_'+fn+'.call(this,args);}')};c=document.createElement('SPAN');cs=c.style;cs.position='absolute';cs.top='0';cs.right='0';cs.backgroundColor='#ddf';t=document.createTextNode('stacktrace.js:');c.appendChild(t);b3=document.createElement('INPUT');b3.type='button';b3.value='Load';b3.onclick=loadJS;c.appendChild(b3);b1=document.createElement('INPUT');b1.type='button';b1.value='window.onerror';b1.onclick=attachToWinError;c.appendChild(b1);i=document.createElement('INPUT');i.type='text';c.appendChild(i);b2=document.createElement('INPUT');b2.type='button';b2.value='Custom';b2.onclick=function(){attachToCustomFunc(i.value)};c.appendChild(b2);document.body.appendChild(c);})();)
18+ * New!* bookmarklet available on the [ project home page] ( http://emwendelin.github.com/javascript-stacktrace/ ) .
1919
2020You can also pass in your own Error to get a stacktrace:
2121
You can’t perform that action at this time.
0 commit comments