code: function isTexImageSource(obj) {
    return (typeof ImageBitmap !== 'undefined' && obj instanceof ImageBitmap) ||
           (typeof ImageData !== 'undefined'  && obj instanceof ImageData) ||
           (typeof HTMLElement !== 'undefined'  && obj instanceof HTMLElement);
  }
docs: check if object is a TexImageSource
  
  @param {Object} obj Object to test
  @return {boolean} true if object is a TexImageSource
  @private