Pass canvas element in to request animation frame