Commit 03d26802 authored by Brandon Aaron's avatar Brandon Aaron

Adding back modified test for #939

parent e0aa10a6
module("event"); module("event");
test("bind()", function() { test("bind()", function() {
expect(9); expect(10);
var handler = function(event) { var handler = function(event) {
ok( event.data, "bind() with data, check passed data exists" ); ok( event.data, "bind() with data, check passed data exists" );
...@@ -18,6 +18,24 @@ test("bind()", function() { ...@@ -18,6 +18,24 @@ test("bind()", function() {
} }
$("#firstp").bind("click", {foo: "bar"}, handler).trigger("click", [{bar: "foo"}]); $("#firstp").bind("click", {foo: "bar"}, handler).trigger("click", [{bar: "foo"}]);
// events don't work with iframes, see #939
var tmp = document.createElement('iframe');
document.body.appendChild( tmp );
var doc = tmp.contentWindow.document;
doc.open();
doc.write("<html><body><input type='text'/></body></html>");
doc.close();
var input = doc.getElementsByTagName("input")[0];
$(input).bind("click",function() {
ok( true, "Binding to element inside iframe" );
});
triggerEvent( input, "click" );
document.body.removeChild( tmp );
var counter = 0; var counter = 0;
function selectOnChange(event) { function selectOnChange(event) {
equals( event.data, counter++, "Event.data is not a global event object" ); equals( event.data, counter++, "Event.data is not a global event object" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment