master: addEventListener now throws error for invalid input params.