weblinc/media-match

addEvent with only 2 parameters throws error in old Firefox

Golmote opened this issue · 1 comments

Hi!

On old versions of Firefox (reproduced with 4.0), the third parameter for addEventListener is required, otherwise an exception is thrown. Would you consider adding the third parameter in the addEvent calls (it will be ignored by attachEvent on IE anyway)?

addEvent(eventPrefix + 'resize', _watch, false);
addEvent(eventPrefix + 'orientationchange', _watch, false);

Sounds fine. Would you mind submitting​ a PR for the work?