Class: InsertElementCommand

history.InsertElementCommand(elem, text)

History command for an element that was added to the DOM.

Constructor

new InsertElementCommand(elem, text)

Parameters:
Name Type Description
elem Element

The newly added DOM element

text string

An optional string visible to user related to this change

Implements:
Source:

Methods

apply(handler) → {void}

Re-inserts the new element.

Parameters:
Name Type Description
handler module:history.HistoryEventHandler
Implements:
Source:
Fires:
Returns:
Type
void

unapply(handler) → {void}

Removes the element.

Parameters:
Name Type Description
handler module:history.HistoryEventHandler
Implements:
Source:
Fires:
Returns:
Type
void