Skip to main content
Module

x/ruck/HeadManager.mjs>default

Ruck is an open source buildless React web application framework for Deno.
Go to Latest
class default
extends EventTarget
import { default } from "https://deno.land/x/ruck@v7.0.0/HeadManager.mjs";

Document head tag manager Fragment.

Constructors

new
default()

Methods

add(
key,
content,
priority?,
)

Adds document head tags.

Gets the managed document head tag content.

If multiple entries have the same head tag fragment key, higher priority or later added ones override.

The final head tag fragments are ordered by key, ensuring:

  • The project author can control the order.
  • Adding or removing managed document head tags causes minimal React rendering DOM mutations that can cause FOUC.
remove(content)

Removes document head tags.