console.log to clone jQuery objects before appending them. #82
@ -6,9 +6,9 @@ describe('console.log', function() {
|
|||||||
|
|
||||||
it("wont eat my precious jqueries", function() {
|
it("wont eat my precious jqueries", function() {
|
||||||
var d = $('<div><div id="inner">b</div></div>');
|
var d = $('<div><div id="inner">b</div></div>');
|
||||||
expect(d.find('#inner').length).toBe(1);
|
expect(d.find('#inner').length).toBe(1);
|
||||||
console.log(d.find('#inner'));
|
console.log(d.find('#inner'));
|
||||||
expect(d.find('#inner').length).toBe(1);
|
expect(d.find('#inner').length).toBe(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
2
vendor/assets/coffeescripts/prolog.coffee
vendored
2
vendor/assets/coffeescripts/prolog.coffee
vendored
@ -2,7 +2,7 @@ if window.JHW
|
|||||||
window.console =
|
window.console =
|
||||||
log: (data) ->
|
log: (data) ->
|
||||||
if typeof(jQuery) != 'undefined' && data instanceof jQuery
|
if typeof(jQuery) != 'undefined' && data instanceof jQuery
|
||||||
JHW.log(style_html($("<div />").append(data).html(), { indent_size: 2 }))
|
JHW.log(style_html($("<div />").append(data.clone()).html(), { indent_size: 2 }))
|
||||||
else
|
else
|
||||||
useJsDump = true
|
useJsDump = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user