It doesn't solve the problem.

The issue isn't that CocoonJS wasn't clearing the canvas, it is that while running in 'accelerated' mode there isn't CSS support. The element.offsetHeight value, used to calculate the lineHeight variable, is always wrong. It's assumed to be the height of its parent element, not the size of its content.