Skip to content

pantoken-root / formats/interactions/src / initTruncateAuto

Funktion: initTruncateAuto() ​

initTruncateAuto(host, target, options?): TruncateAutoHandle

Hold --lines synkroniseret med tilgængelig højde for et auto-klemt truncate-mål.

  • CSS-brug: videregiv det samme element som host og target.
  • Web-component-brug: videregiv custom-element host + shadow truncate target span.

Parametre ​

host ​

HTMLElement

target ​

HTMLElement

options? ​

TruncateAutoOptions

Returnerer ​

TruncateAutoHandle