You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onEnter and onExit callbacks currently receive the watched element as the first argument. It would be useful to receive the options that were passed when registering the callback as well.
My use case is currently only for testing. I want to test that the correct value is passed for the scrollableArea option. It's a bit hard to write a test that actually asserts the behavior of IntersectionObserver and its implementation of the root argument. Since my abstraction for IO is this addon, I could write my test case to the API provided here instead.
Something like this:
<div{{in-viewportonEnter=this.fooscrollableArea=".something"}}>
{{!-- function foo(element, options) { assert.equal(options.scrollableArea, '.something');}--}}
I think this could be achieved by binding these options before adding them to rafAdmin or observerAdmin when adding the callbacks.
The text was updated successfully, but these errors were encountered:
The
onEnter
andonExit
callbacks currently receive the watched element as the first argument. It would be useful to receive the options that were passed when registering the callback as well.My use case is currently only for testing. I want to test that the correct value is passed for the
scrollableArea
option. It's a bit hard to write a test that actually asserts the behavior ofIntersectionObserver
and its implementation of theroot
argument. Since my abstraction for IO is this addon, I could write my test case to the API provided here instead.Something like this:
I think this could be achieved by binding these options before adding them to
rafAdmin
orobserverAdmin
when adding the callbacks.The text was updated successfully, but these errors were encountered: