docs: function getSize(object) {
  	function getCanvasSize(canvas) {
  		try {
  			const HTMLCanvasElement = self.HTMLCanvasElement || self.Canvas;
  			return {
  				width: HTMLCanvasElement.prototype.getAttribute.call(canvas, 'width') - 0,
  				height: HTMLCanvasElement.prototype.getAttribute.call(canvas, 'height') - 0,
  			};
  		} catch (e) {
  			//noop
  		}
  		try {
  			return {
  				width: canvas.getAttribute('width') - 0,
  				height: canvas.getAttribute('height') - 0,
  			};
  		} catch (e) {
  			//noop
  		}
  		const {width, height} = object;
  		return {width, height};
  	}
  	if (isCanvas(object)) {
  		return getCanvasSize(object);
  	} else if (isContext(object)) {
  		return getCanvasSize(object.canvas);
  	}
  	const {width, height} = object;
  	return {width, height};
  }