aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/charError.ts
blob: dfc054aff575ada20faed7235699b850fb785cfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
import transparentPng from "../constants/transparentPng";

/**
 * Triggered when there was an error loading a character sprite.
 * @param {HTMLImageElement} image the element containing the missing image
 */
export function charError(image: HTMLImageElement) {
  console.warn(`${image.src} is missing from webAO`);
  image.src = transparentPng;
  return true;
}
window.charError = charError;