Add deadlyicon console fix for safari
This commit is contained in:
parent
cf6d26d25f
commit
328cc89980
2
Rakefile
2
Rakefile
|
@ -67,7 +67,7 @@ jasmine.version_= {
|
|||
|
||||
desc "Run jasmine tests of source via server"
|
||||
task :server do
|
||||
jasmine_includes = lambda { jasmine_sources + ['lib/TrivialReporter.js'] }
|
||||
jasmine_includes = lambda { jasmine_sources + ['lib/TrivialReporter.js', 'lib/consolex.js'] }
|
||||
start_jasmine_server(jasmine_includes)
|
||||
end
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ module Jasmine
|
|||
@jasmine_files = jasmine_files || [
|
||||
"/__JASMINE_ROOT__/lib/" + File.basename(Dir.glob("#{Jasmine.root}/lib/jasmine*.js").first),
|
||||
"/__JASMINE_ROOT__/lib/TrivialReporter.js",
|
||||
"/__JASMINE_ROOT__/lib/json2.js"
|
||||
"/__JASMINE_ROOT__/lib/json2.js",
|
||||
"/__JASMINE_ROOT__/lib/consolex.js",
|
||||
]
|
||||
@stylesheets = ["/__JASMINE_ROOT__/lib/jasmine.css"] + stylesheets
|
||||
end
|
||||
|
|
|
@ -220,6 +220,18 @@ ul.inheritsList
|
|||
<h1 class="classTitle">File Index</h1>
|
||||
|
||||
|
||||
<div>
|
||||
<h2><a href="symbols/src/lib_consolex.js.html">lib/consolex.js</a></h2>
|
||||
|
||||
<dl>
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<div>
|
||||
<h2><a href="symbols/src/lib_jasmine-0.10.0.js.html">lib/jasmine-0.10.0.js</a></h2>
|
||||
|
||||
|
@ -260,7 +272,7 @@ ul.inheritsList
|
|||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -308,7 +308,7 @@ ul.inheritsList
|
|||
</div>
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -910,7 +910,7 @@ A convenience method that allows existing specs to be disabled temporarily durin
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -341,7 +341,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -509,7 +509,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -318,7 +318,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -415,7 +415,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -318,7 +318,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -702,7 +702,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -318,7 +318,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -329,7 +329,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -341,7 +341,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -847,7 +847,7 @@ expect(foo.bar.callCount).toEqual(0);</pre>
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -347,7 +347,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -762,7 +762,7 @@ Jasmine environment.
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -318,7 +318,7 @@ ul.inheritsList
|
|||
<!-- ============================== footer ================================= -->
|
||||
<div class="fineprint" style="clear:both">
|
||||
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 16:58:08 GMT-0700 (PDT)
|
||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> 2.1.0 on Thu Oct 29 2009 19:47:57 GMT-0700 (PDT)
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -123,15 +123,4 @@
|
|||
<span class='line'>116</span>
|
||||
<span class='line'>117</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="NAME">paramMap</span><span class="PUNC">[</span><span class="STRN">"spec"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>118</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">spec.getFullName</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">indexOf</span><span class="PUNC">(</span><span class="NAME">paramMap</span><span class="PUNC">[</span><span class="STRN">"spec"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>119</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>120</span>
|
||||
<span class='line'>121</span> </span><span class="COMM">//protect against console.log incidents</span><span class="WHIT">
|
||||
<span class='line'>122</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="PUNC">!</span><span class="PUNC">(</span><span class="STRN">"console"</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">window</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">!</span><span class="PUNC">(</span><span class="STRN">"firebug"</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">console</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>123</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"log"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"debug"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"info"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"warn"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"error"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"assert"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"dir"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"dirxml"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"group"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"groupEnd"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"time"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"timeEnd"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"count"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"trace"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"profile"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"profileEnd"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>124</span> </span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>125</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">names.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">len</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">++</span><span class="NAME">i</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>126</span> </span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'>127</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'>128</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>129</span> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'>130</span> </span></pre></body></html>
|
||||
<span class='line'>119</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>
|
|
@ -0,0 +1,29 @@
|
|||
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
|
||||
.KEYW {color: #933;}
|
||||
.COMM {color: #bbb; font-style: italic;}
|
||||
.NUMB {color: #393;}
|
||||
.STRN {color: #393;}
|
||||
.REGX {color: #339;}
|
||||
.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
|
||||
</style></head><body><pre><span class='line'> 1</span> <span class="COMM">/** Console X
|
||||
<span class='line'> 2</span> * http://github.com/deadlyicon/consolex.js
|
||||
<span class='line'> 3</span> *
|
||||
<span class='line'> 4</span> * prevents console errors and makes IE console objects true functions
|
||||
<span class='line'> 5</span> *
|
||||
<span class='line'> 6</span> */</span><span class="WHIT">
|
||||
<span class='line'> 7</span> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 8</span> </span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">window.console</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 9</span>
|
||||
<span class='line'> 10</span> </span><span class="WHIT"> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">names</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="STRN">"log"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"debug"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"info"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"warn"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"error"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"assert"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"dir"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"dirxml"</span><span class="PUNC">,</span><span class="WHIT">
|
||||
<span class='line'> 11</span> </span><span class="WHIT"> </span><span class="STRN">"group"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"groupEnd"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"time"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"timeEnd"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"count"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"trace"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"profile"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"profileEnd"</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 12</span>
|
||||
<span class='line'> 13</span> </span><span class="WHIT"> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">emptyFunction</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'> 14</span>
|
||||
<span class='line'> 15</span> </span><span class="WHIT"> </span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC"><</span><span class="WHIT"> </span><span class="NAME">names.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">++</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 16</span> </span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">emptyFunction</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 17</span> </span><span class="WHIT"> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="STRN">'function'</span><span class="PUNC">)</span><span class="WHIT">
|
||||
<span class='line'> 18</span> </span><span class="WHIT"> </span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">method</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
|
||||
<span class='line'> 19</span> </span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">Function.prototype.apply.apply</span><span class="PUNC">(</span><span class="NAME">method</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="NAME">console</span><span class="PUNC">,</span><span class="NAME">arguments</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 20</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="NAME">window.console</span><span class="PUNC">[</span><span class="NAME">names</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
|
||||
<span class='line'> 21</span> </span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
|
||||
<span class='line'> 22</span> </span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>
|
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,7 @@
|
|||
</head>
|
||||
<script type="text/javascript" src="../../lib/jasmine-0.10.0.js"></script>
|
||||
<script type="text/javascript" src="../../lib/TrivialReporter.js"></script>
|
||||
<script type="text/javascript" src="../../lib/consolex.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="../../lib/jasmine.css">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -10,7 +10,9 @@ class JasmineHelper
|
|||
def self.jasmine
|
||||
['/lib/' + File.basename(Dir.glob("#{JasmineHelper.jasmine_lib_dir}/jasmine*.js").first)] +
|
||||
['/lib/json2.js',
|
||||
'/lib/TrivialReporter.js']
|
||||
'/lib/TrivialReporter.js',
|
||||
'/lib/consolex.js'
|
||||
]
|
||||
end
|
||||
|
||||
def self.jasmine_src_dir
|
||||
|
|
|
@ -117,13 +117,3 @@ jasmine.TrivialReporter.prototype.specFilter = function(spec) {
|
|||
if (!paramMap["spec"]) return true;
|
||||
return spec.getFullName().indexOf(paramMap["spec"]) == 0;
|
||||
};
|
||||
|
||||
//protect against console.log incidents
|
||||
if (!("console" in window) || !("firebug" in console)) {
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
||||
window.console = {};
|
||||
for (var i = 0, len = names.length; i < len; ++i) {
|
||||
window.console[names[i]] = function() {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/** Console X
|
||||
* http://github.com/deadlyicon/consolex.js
|
||||
*
|
||||
* prevents console errors and makes IE console objects true functions
|
||||
*
|
||||
*/
|
||||
(function() {
|
||||
window.console || (window.console = {});
|
||||
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
||||
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
||||
|
||||
function emptyFunction(){}
|
||||
|
||||
for (var i = 0; i < names.length; ++i){
|
||||
window.console[names[i]] || (window.console[names[i]] = emptyFunction);
|
||||
if (typeof window.console[names[i]] !== 'function')
|
||||
window.console[names[i]] = (function(method) {
|
||||
return function(){ return Function.prototype.apply.apply(method, [console,arguments]); };
|
||||
})(window.console[names[i]]);
|
||||
}
|
||||
})();
|
|
@ -536,7 +536,7 @@ jasmine.version_= {
|
|||
"major": 0,
|
||||
"minor": 10,
|
||||
"build": 0,
|
||||
"revision": 1256860688
|
||||
"revision": 1256870877
|
||||
};
|
||||
/**
|
||||
* @namespace
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
<script type="text/javascript" src="../src/WaitsForBlock.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../lib/TrivialReporter.js"></script>
|
||||
<script type="text/javascript" src="../lib/consolex.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
Loading…
Reference in New Issue