# Variable SwapMode`Const`

SwapMode: {
afterbegin: "afterbegin";
afterend: "afterend";
beforebegin: "beforebegin";
beforeend: "beforeend";
delete: "delete";
innerHTML: "innerHTML";
none: "none";
outerHTML: "outerHTML";
textContent: "textContent";
} = ...

Possible values for `data-swap` attribute

#### Type Declaration

- ##### `Readonly` afterbegin: "afterbegin"

  Inserts HTML inside the element, before its first child

- ##### `Readonly` afterend: "afterend"

  Inserts HTML immediately after the element itself

- ##### `Readonly` beforebegin: "beforebegin"

  Inserts HTML immediately before the element itself

- ##### `Readonly` beforeend: "beforeend"

  Inserts HTML inside the element, after its last child

- ##### `Readonly` delete: "delete"

  Removes the element entirely

- ##### `Readonly` innerHTML: "innerHTML"

  (default) Replaces the contents inside the element

- ##### `Readonly` none: "none"

  Performs no insertion (no-op)

- ##### `Readonly` outerHTML: "outerHTML"

  Replaces the entire element, including the tag itself

- ##### `Readonly` textContent: "textContent"

  Inserts plain text (without parsing HTML)