make buffer canvas handled by JS