Error in Firefox with addEventListener

48 views
Skip to first unread message

Scott Finkelstein

unread,
Dec 21, 2009, 11:27:46 AM12/21/09
to iPhoneWebDev
I'm trying to add an 'aftertransition' event listener to a page
section so that when the section slides in, it makes an ajax call.
This works perfectly in Safari, but when I test it in Firefox the data
doesn't load into the new section. You can see in this example:

var gamesElement=document.getElementById('games'); //Line 33

gamesElement.addEventListener('aftertransition', function(event) { //
Line 34
getAthleticGamesAndScores();
});

in the Firefox, this is the error message I'm receiving:

"uncaught exception: [Exception... "Not enough arguments" nsresult:
"0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame ::
http://web.adelphi.edu/scott/mobile/athletics.php#_games ::
anonymous :: line 34" data: no]"

Has anyone come across this error in FF? if so, is there a workaround?

Any insight would be appreciated.

- Scott

ltlfrari

unread,
Dec 21, 2009, 12:31:02 PM12/21/09
to iPhoneWebDev
Shouldn't it be

gamesElement.addEventListener('aftertransition', function(event) {
getAthleticGamesAndScores();
},true|false);

IE, add true or false depending on your requirements. true=capturing
phase, false=bubbling phase (I think)

Scott Finkelstein

unread,
Dec 21, 2009, 12:55:16 PM12/21/09
to iPhoneWebDev
Thanks! I never actually new about the true or false parameter.
Reply all
Reply to author
Forward
0 new messages