Feature Request: event listener that detects screen size change

Can you give a concrete example on how to add an event listener to a Custom-Element?