Log in
Model

TokenList

Magento\PageBuilder\Model\Dom\TokenList

What it does

This class wraps the PhpGt DOM TokenList library to provide a consistent interface for managing space-separated tokens in HTML element attributes (like CSS classes).

Developers use this when working with Page Builder content to add, remove, check, or toggle CSS classes and other tokenized attribute values on DOM elements.

Public Methods

  • item()
  • contains()
  • add()
  • remove()
  • toggle()