Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

HtmlResponsiveImageSelector

Namespace OfficeIMO.Html
Assembly OfficeIMO.Html
Modifiers static

Selects one candidate from an HTML srcset and sizes pair without depending on a DOM provider.

Inheritance

  • Object
  • HtmlResponsiveImageSelector

Methods

public static HtmlResponsiveImageSelection Select(String srcSet, String sizes, String defaultSource, HtmlResponsiveImageSelectionOptions options = null) #
Returns: HtmlResponsiveImageSelection

Selects one source using deterministic density preference. Width descriptors are normalized by the first matching supported sizes entry; an omitted or unsupported list falls back to 100vw.

Parameters

srcSet System.String requiredposition: 0
Authored source-set value.
sizes System.String requiredposition: 1
Optional source-size list.
defaultSource System.String requiredposition: 2
Optional src fallback. It participates as 1x only for density sets without an authored 1x candidate.
options OfficeIMO.Html.HtmlResponsiveImageSelectionOptions = null optionalposition: 3
Selection environment.