问题
Is there a way of detecting if the browser will freeze the DOM or disable JavaScript while scrolling? It's known that some mobile browsers do this, and it effectively kills scrolling-based effects like parallax and animations. I'd like to effectively implement the following pseudocode without resorting to UA sniffing:
if (!browserWillFreezeWhileScrolling) {
initializeScrollingEffects();
} else {
initializeFallbackScript(); // maybe unnecessary
}
From what I can see, Modernizr doesn't check it.
来源:https://stackoverflow.com/questions/17205074/is-there-a-way-of-detecting-if-the-browser-will-freeze-the-dom-while-scrolling