Git Product home page Git Product logo

bounds.js's Issues

Cannot set property 'history' of undefined

Hi,
in our error logging system we've got messages complaining that
Cannot set property 'history' of undefined

This is the only place in the code where history is assigned.

data.history = event.isIntersecting

This happens only in Chrome versions 51-57 which are known to have missing isIntersecting
https://caniuse.com/#feat=intersectionobserver
and this should be polyfilled correctly
https://github.com/w3c/IntersectionObserver/blob/d3eece49746574f43798d411d9fea2968251b075/polyfill/intersection-observer.js#L23-L34

I was trying to use Chromium of those old versions but nothing fails with the polyfill included.

Also the demo page
https://chriscavs.github.io/bounds-demo/
in this Chromium version (macOS 53.0.2767.0 (64-bit) to be exact) does not correctly loads lazy loading images. Top example works ok. I see that polyfill is included in the bundle.
https://chriscavs.github.io/bounds-demo/dist/bundle.js
Maybe that's somehow related. No errors in Chromium console though.

Chromium versions if someone would like to test it.
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html

Any ideas what might be going on and why data might be undefined?

TypeError when options parameter is not provided

When invoking bound.js without an options parameter like ...

const windowBound = Bounds();

... I get the error bounds.js:1 Uncaught TypeError: Cannot read property 'root' of undefined.

Using an empty param (const windowBound = Bounds({});) as a workaround.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.