Creates the GlobalEventsService
@Inject
is used to allow a mock window during testing
(following this Stackoverflow answer).
Collection of EventEmiiters that broadcast DOM actionable global events.
@Inject
is used to allow a mock window during testing
(following this Stackoverflow answer).
Triggered once when the service is created
Called on each event (e.g. scroll/resize)
requestAnimationFrame
is currently running, then it will skip this event.requestAnimationFrame
the event requested will emit to the
subscribers of this event that it is okay to perform short, optimized DOM operations.Sets up listeners to the scroll and resize events. These are filtered by requestTick.
True for any event type that is currently waiting for requestAnimationFrame
to complete. All
animation requests initiated while true will be ignored for the given event type.
Generated using TypeDoc
Reponsible for handling and dispatching global events such as
window
resizing,body
scrolling, etc.StickyScrollComponent, WatchHeightDirective
AppComponent