Created
February 1, 2019 11:44
-
-
Save caina-jumia/6ac5ca41c1df07d470767aa21a58a05c to your computer and use it in GitHub Desktop.
Check if browser has support for feature passively
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var optionsSupport = 'nha'; | |
try { | |
window.scroll({ | |
get top () { | |
optionsSupport = true; | |
}, | |
}); | |
} catch (e) { | |
optionsSupport = false; | |
} | |
alert(optionsSupport); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment