Opened 16 years ago

Closed 15 years ago

#2164 closed defect (fixed)

Mistake in BUFakeNode.js, BUFakeNode.find_listener_()

Reported by: [email protected] Owned by: dylan
Priority: high Milestone: 0.9
Component: TestFramework Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:


The BUFakeNode.find_listener_() method in trunk/testtools/JsFakeDom/BUFakeDom.js contains a mistake, which means it never finds a listener and always returns -1. This problem causes both BUFakeNode.addEventListener() and BUFakeNode.removeEventListener() to function improperly.

The fix is simple. Line 319

return burst.Alg.find(this.listeners_, function(o) {o[0] == eventType && o[1] === listener && o[2] == useCapture});

should be

return burst.Alg.find_if(this.listeners_, function(o) {
    return o[0] == eventType && o[1] === listener && o[2] == useCapture

Change History (2)

comment:1 Changed 15 years ago by dylan

Milestone: 0.9
Owner: changed from alex to dylan
Status: newassigned

comment:2 Changed 15 years ago by dylan

Resolution: fixed
Status: assignedclosed

(In [7151]) fixes #2164, Mistake in BUFakeNode.js, BUFakeNode.find_listener_(), thanks James

Note: See TracTickets for help on using tickets.