Polymer element for triggering an event when nearing the beginning or end of a scrollable element