Closed LordPachelbel closed 4 years ago
IntersectionObserver is enabled by default in iOS Safari's Experimental Features list, but it doesn't seem to work in a Cordova app:
let observer = new IntersectionObserver(entries => { if (entries[0].boundingClientRect.y < 0) { document.body.classList.add("header-not-at-top"); } else { document.body.classList.remove("header-not-at-top"); } }); observer.observe(document.querySelector("#top-of-site-pixel-anchor"));
The new line throws an exception: ReferenceError: Can't find variable: IntersectionObserver
new
ReferenceError: Can't find variable: IntersectionObserver
It probably doesn't work for the same reason WebGL2 stuff doesn't work, right?
Correct, experimental features are not enabled in app webviews, so they cannot be used.
IntersectionObserver is enabled by default in iOS Safari's Experimental Features list, but it doesn't seem to work in a Cordova app:
The
new
line throws an exception:ReferenceError: Can't find variable: IntersectionObserver
It probably doesn't work for the same reason WebGL2 stuff doesn't work, right?