JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 333
  • Score
    100M100P100Q82549F
  • License ISC

A ponyfill based on the w3c/IntersectionObserver polyfill

Package Exports

  • inteobs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (inteobs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

inteobs

A ponyfill based on the w3c/IntersectionObserver polyfill

This module will help you get to use the goodness of Intersection Observer without affecting builtins.

The name is a playful contraction of Intersection Observer to inte-obs [ˈɪnˌtɛ-əbz] (first part in swedish meaning not - and then "obs" - so "not-observer").

Install

npm install inteobs

Usage

The default export of the package is either a reference to the native window.IntersectionObserver - or a js implementation of it:

import IntersectionObserver from "inteobs";

Caveats

One difference between this module and the official polyfill is that - due to being a ponyfill - a missing property in Edge 15 (isIntersecting) cannot be patched. However - the property in question is not at all essential for Intersection Observer to work (it can be worked around).

Credits

This module basically just exposes a repackaged w3c/IntersectionObserver - so any credit really has go to the great work done by its contributors :)