// 3. Check the usability of the image argument. If this throws an exception or returns bad, then return a promise rejected with an "InvalidStateError" DOMException.
- // FIXME: "Check the usability of the image argument" is only defined for CanvasImageSource, let's skip it for other types
- if (image.has<CanvasImageSource>()) {
- if (auto usability = check_usability_of_image(image.get<CanvasImageSource>()); usability.is_error() or usability.value() == CanvasImageSourceUsability::Bad) {
- auto error = WebIDL::InvalidStateError::create(this_impl().realm(), "image argument is not usable"_string);