Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

README.md

context.clear

Monkey-patches the 2D canvas context (CanvasRenderingContext2D) to include a clear method that clears the screen.

Usage (after including the library):

var canvas = document.querySelector('canvas')
var context = canvas.getContext('2d')

// ...draw some stuff...
context.clear()
// now it's all gone!

If canvas isn't supported, this silently fails.

It's a very short library. Enjoy!

About

adds CanvasRenderingContext2D.prototype.clear

Resources

License

Releases

No releases published
You can’t perform that action at this time.