Skip to main content

Module srcset

Module srcset 

Source

Structsยง

Descriptor
https://html.spec.whatwg.org/multipage/#width-descriptor https://html.spec.whatwg.org/multipage/#pixel-density-descriptor
ImageSource
https://html.spec.whatwg.org/multipage/#image-source
SourceSet ๐Ÿ”’
https://html.spec.whatwg.org/multipage/#source-set

Enumsยง

ParseState ๐Ÿ”’

Constantsยง

SUPPORTED_IMAGE_MIME_TYPES ๐Ÿ”’
Supported image MIME types as defined by https://mimesniff.spec.whatwg.org/#image-mime-type. Keep this in sync with โ€˜detect_image_formatโ€™ from components/pixels/lib.rs

Functionsยง

collect_sequence_characters ๐Ÿ”’
Collect sequence of code points https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points
is_supported_image_mime_type ๐Ÿ”’
Returns true if the given image MIME type is supported.
is_valid_floating_point_number_string ๐Ÿ”’
https://html.spec.whatwg.org/multipage/#valid-floating-point-number TODO(#39315): Use the validation rule from Stylo
is_valid_non_negative_integer_string ๐Ÿ”’
https://html.spec.whatwg.org/multipage/#valid-non-negative-integer TODO(#39315): Use the validation rule from Stylo
parse_a_sizes_attribute
https://html.spec.whatwg.org/multipage/#parse-a-sizes-attribute
parse_a_srcset_attribute
Parse an srcset attribute: https://html.spec.whatwg.org/multipage/#parsing-a-srcset-attribute.