diff options
| author | Stephen Blott | 2014-12-17 16:44:47 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-12-17 16:44:47 +0000 |
| commit | c972978b43b943a1ad8709992d080bedbbe12ae2 (patch) | |
| tree | 87b497be1a387575bf918475d727cbd9603f62c3 | |
| parent | 3b25fd52431130aa5c3e9359075574458c307ef2 (diff) | |
| download | vimium-c972978b43b943a1ad8709992d080bedbbe12ae2.tar.bz2 | |
Add comment re. Math.sign().
| -rw-r--r-- | content_scripts/scroller.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/content_scripts/scroller.coffee b/content_scripts/scroller.coffee index 09470158..2f69fc7d 100644 --- a/content_scripts/scroller.coffee +++ b/content_scripts/scroller.coffee @@ -5,6 +5,10 @@ activatedElement = null # Return 0, -1 or 1: the sign of the argument. +# NOTE(smblott; 2014/12/17) We would like to use Math.sign(). However, according to this site +# (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign) Math.sign() was +# only introduced in Chrome 38. This caused problems in R1.48 for users with old Chrome installations. We +# can replace this with Math.sign() at some point. getSign = (val) -> if not val 0 |
