ansilove.js

A script to display ANSi and artscene related file formats on web pages
Log | Files | Refs | README | LICENSE

commit 6317bc74cc5492061ab3b2e585010d3c9c90cdb9
parent c1c475e08944940ea4ae6afd840bf52ede28bcb7
Author: Andy Herbert <andy.herbert@gmail.com>
Date:   Thu, 17 Oct 2013 20:20:32 +0100

Added documentation for error-handling the loading of files.

Diffstat:
MREADME.md | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -68,6 +68,14 @@ And for ANSImations, the animate function returns a controller object which when }); }, {"bits": "9"}); +If a function is passed after the options object of any method, then it will be called in the event that the file cannot be fetched: + + AnsiLove.render("example.ans", function (canvas, sauce) { + ... + }, {}, function () { + alert("An error occured."); + }); + ### PC font options: - 80x25 (Default, code page 437)