Skip to content

pantoken / formats/interactions/src / initTruncateAuto

Funksjon: initTruncateAuto()

initTruncateAuto(host, target, options?): TruncateAutoHandle

Hold --lines synkronisert med tilgjengelig høyde for et automatisk avkortet truncate-mål.

  • CSS-bruk: angi samme element som host og target.
  • Web-komponentbruk: angi custom-element host + shadow truncate target span.

Parametere

host

HTMLElement

target

HTMLElement

options?

TruncateAutoOptions

Returnerer

TruncateAutoHandle