Added 'on' method

‘on’ method updates the match media by passing in a callback function.