Remove need for bind()

This commit is contained in:
Jesse Tan 2017-12-06 10:10:39 +01:00
parent 1266936100
commit 237289320d

View File

@ -31,7 +31,7 @@ function ThemeNav () {
if (!self.linkScroll) { if (!self.linkScroll) {
if (!self.winScroll) { if (!self.winScroll) {
self.winScroll = true; self.winScroll = true;
requestAnimationFrame(self.onScroll.bind(self)); requestAnimationFrame(function() { self.onScroll(); });
} }
} }
}); });
@ -40,7 +40,7 @@ function ThemeNav () {
self.win.on('resize', function () { self.win.on('resize', function () {
if (!self.winResize) { if (!self.winResize) {
self.winResize = true; self.winResize = true;
requestAnimationFrame(self.onResize.bind(self)); requestAnimationFrame(function() { self.onResize(); });
} }
}); });