const options = { root : null , rootMargin : '0px' , threshold : 0 , } ; export default function ( cb ) { if ( typeof IntersectionObserver === 'undefined' ) { console . warn ( `IntersectionObserver is not supported in this browser` ) ; return null ; } return new IntersectionObserver ( cb , options ) ; }