jQuery ajax post test case

Text case for http://bugs.jquery.com/ticket/12404

by BorisMoore

HTML

Text case for http://bugs.jquery.com/ticket/12404<br/>

Uncomment either of the commented lines and you will get a stack overflow error

JavaScript

var obj = { foo : "bar" };

//$(obj).on("baz", function() {}, obj);

try {
    $.post("test", obj);
} catch (e) {
    alert(e);         
}

var obj2 = { foo : "bar" };

//$.data(obj2, "test", obj2 );

try {
    $.post("test", obj2);
} catch (e) {
    alert(e);         
}