Nit: @campd and @Benvie pointed out to me today in #devtools that SpiderMonkey has good name inference these days, even for callback functions (although I'm not sure what it would call this one), so it isn't necessary to name function expressions anymore, and they generally recommend against doing so (except when adding a listener that must remove itself). So I would make this an anonymous function.