SOURCE

let image = new Image(); // nodejs 没有 Image

image.addEventListener('error', function (ev) {
  console.log(`${ev.target}: ${ev.type}`);
})

image.addEventListener('abort', function (ev) {
  console.log(`${ev.target}: ${ev.type}`);
})

image.addEventListener('load', function (ev) {
  console.log(`${ev.target}: ${ev.type}`);
})

image.addEventListener('beforeunload', function (ev) {
  console.log(`${ev.target}: ${ev.type}`);
})

image.addEventListener('unload', function (ev) {
  console.log(`${ev.target}: ${ev.type}`);
})

image.src = 'https://github.com/nonelittlesong/resources/blob/master/images/protocpls.jpg';
console 命令行工具 X clear

                    
>
console