The 2D layer · function
createNullTextHost
A host that focuses nothing and whose clipboard is empty.
Explained in Sprites and tilemaps.
function createNullTextHost(): TextHostimport { createNullTextHost } from '@driftengine/ui2d';In depth
What a test uses, and what a headless build uses. An empty clipboard rather than a missing one, so a caller never has to branch on whether it has a host.