Created
September 18, 2012 17:30
-
-
Save brendandahl/3744488 to your computer and use it in GitHub Desktop.
mozPrintCallback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>mozPrintCallback</title> | |
</head> | |
<body> | |
<canvas id="canvas" width="200" height="200"></canvas> | |
<script type="text/javascript"> | |
var canvas = document.getElementById('canvas'); | |
canvas.mozPrintCallback = function(printState) { | |
var ctx = printState.context; | |
ctx.fillText('Hi there.', 50, 50); | |
printState.done(); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment