Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
super.init(...arguments);
set(this, 'registry', new WeakMap());
let options = assign({
viewportUseRAF: canUseRAF()
}, this._buildOptions());
// set viewportUseIntersectionObserver after merging users config to avoid errors in browsers that lack support (https://github.com/DockYard/ember-in-viewport/issues/146)
options = assign(options, {
viewportUseIntersectionObserver: canUseIntersectionObserver(),
});
setProperties(this, options);
}
init() {
// ensure this mixin runs first, then your component can override the options
this._super(...arguments);
let options = assign({
viewportUseRAF: canUseRAF(),
viewportEntered: false,
viewportListeners: []
}, this._buildOptions());
// set viewportUseIntersectionObserver after merging users config to avoid errors in browsers that lack support (https://github.com/DockYard/ember-in-viewport/issues/146)
options = assign(options, {
viewportUseIntersectionObserver: canUseIntersectionObserver(),
});
setProperties(this, options);
set(this, '_evtListenerClosures', []);
},