diff --git a/src/core/service/api/create-intersection-observer.js b/src/core/service/api/create-intersection-observer.js index 9d20cd0c3f66a6b88baa690285ff8dc58988e4e8..c184e113b25dae856b681c55f232bf9caa4db5e8 100644 --- a/src/core/service/api/create-intersection-observer.js +++ b/src/core/service/api/create-intersection-observer.js @@ -20,10 +20,12 @@ class MPIntersectionObserver { relativeTo (selector, margins) { this.options.relativeToSelector = selector this._makeRootMargin(margins) + return this } relativeToViewport (margins) { this.options.relativeToSelector = null this._makeRootMargin(margins) + return this } observe (selector, callback) { if (typeof callback !== 'function') {