@matthewp/linkedom
Version:
A triple-linked lists based DOM implementation
19 lines (18 loc) • 378 B
JavaScript
/* c8 ignore start */
try {
module.exports = require('canvas');
}
catch (fallback) {
class Canvas {
constructor(width, height) {
this.width = width;
this.height = height;
}
getContext() { return null; }
toDataURL() { return ''; }
}
module.exports = {
createCanvas: (width, height) => new Canvas(width, height)
};
}
/* c8 ignore stop */