In any case it is merely to show it can be done using canvas - test demo using Chrome and don't change mouse so often :-). Chrome waits until the image is decoded before switching over. FF clears the cursor when setting a new image but since the new image needs to be decoded it shows the default in the mean time. Note: FireFox has problem when the cursor is changed so frequent as in this demo - updated to change only once per second. I made mine the largest black one they had. Just to add the possibility to dynamically adding a cursor without providing an image but generating it on client with JavaScript and Canvas.ĭemo contains a simple cursor drawn with shapes, but this could just as easily have been images, video and so forth (everything a canvas support).įiddle (updated 5/2016 for Firefox - moved from document to element). I just typed cursors in the start search box and all kind of choices came up.