Skip to content

pantoken-root / formats/interactions/src / initTruncateAuto

Funkcja: initTruncateAuto() ​

initTruncateAuto(host, target, options?): TruncateAutoHandle

Utrzymuj --lines w synchronizacji z dostępną wysokością dla automatycznie ograniczanego celu przycinania.

  • Użycie w CSS: przekaż ten sam element jako host i target.
  • Użycie w komponencie webowym: przekaż hosta elementu niestandardowego + span celu przycinania w shadow DOM.

Parametry ​

host ​

HTMLElement

target ​

HTMLElement

options? ​

TruncateAutoOptions

Zwraca ​

TruncateAutoHandle