\caption{...} inside a float. Only ever built inside a FloatBlock.content (doc/build.ts refuses one anywhere else), because a caption's number comes from the float's class and its setting is part of setting the float.
\caption{...}
FloatBlock.content
doc/build.ts
Always present, so \listoffigures and \pageref can learn the caption's page.
\listoffigures
\pageref
"3" — \thefigure. Null only when the float class could not be established.
"3"
\thefigure
\caption{...}inside a float. Only ever built inside aFloatBlock.content(doc/build.tsrefuses one anywhere else), because a caption's number comes from the float's class and its setting is part of setting the float.