Skip to content

pantoken-root / formats/interactions/src / initTruncateAuto

Funció: initTruncateAuto() ​

initTruncateAuto(host, target, options?): TruncateAutoHandle

Manté --lines sincronitzat amb l'alçada disponible per a un target de truncament automàtic.

  • Ús de CSS: passa el mateix element que host i target.
  • Ús de component web: passa custom-element host + shadow truncate target span.

Paràmetres ​

host ​

HTMLElement

target ​

HTMLElement

options? ​

TruncateAutoOptions

Retorna ​

TruncateAutoHandle